Commit 86cda8ef authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci

postrm: Added purge option and the code to remove the rest of the agent

If the purge option is not used and the INEP is configured, the script will
remove everything except the inep and proxy files. If it was called using
the purge option, all the files from seed_mec home will be deleted.
Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarAryane Ast dos Santos <aras10@c3sl.ufpr.br>
parent ac02ba5c
......@@ -20,6 +20,20 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This is the postrm of proinfodata
SEED_MEC_HOME="/opt/seed_mec"
if test "$1" != "purge" -a -f "${SEED_MEC_HOME}/SEED2/client/conf/inep"; then
rm -rf "${SEED_MEC_HOME}/SEED2/"[^c]* \
"${SEED_MEC_HOME}/SEED2/"c[^l]* \
"${SEED_MEC_HOME}/SEED2/client/"[^c]* \
"${SEED_MEC_HOME}/SEED2/client/common.sh" \
"${SEED_MEC_HOME}/SEED2/client/conf/version"
else
rm -rf "${SEED_MEC_HOME}"
fi
# Files to divert
DIVERTS="
/etc/init/dbus.conf \
......@@ -33,3 +47,5 @@ if [[ "$1" != "upgrade" ]]; then
--divert ${file}{.real,}
done
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment