Skip to content
Snippets Groups Projects
Commit 86cda8ef authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,20 @@ ...@@ -20,6 +20,20 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # 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 # Files to divert
DIVERTS=" DIVERTS="
/etc/init/dbus.conf \ /etc/init/dbus.conf \
...@@ -33,3 +47,5 @@ if [[ "$1" != "upgrade" ]]; then ...@@ -33,3 +47,5 @@ if [[ "$1" != "upgrade" ]]; then
--divert ${file}{.real,} --divert ${file}{.real,}
done done
fi fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment