[PATCH 2 of 2] Remove cron job on deinstallation
Wald Commits
scm-commit at wald.intevation.org
Fri Jul 4 17:18:39 CEST 2014
# HG changeset patch
# User Sascha Wilde <wilde at intevation.de>
# Date 1404487085 -7200
# Node ID 27dd0012288a36491552e05a6de2d1d6f8258430
# Parent 7783823428025b4a0bbd61d5133ae971a21cd83b
Remove cron job on deinstallation.
diff -r 778382342802 -r 27dd0012288a packaging/linux-installer.inc.in
--- a/packaging/linux-installer.inc.in Fri Jul 04 17:13:57 2014 +0200
+++ b/packaging/linux-installer.inc.in Fri Jul 04 17:18:05 2014 +0200
@@ -193,12 +193,19 @@
local tmpcrontab=`mktemp`
crontab -l | grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \
>"$tmpcrontab"
- echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \
- >>"$tmpcrontab"
+ if [ "$1" != "deinstall" ] ; then
+ echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \
+ >>"$tmpcrontab"
+ fi
crontab "$tmpcrontab"
rm "$tmpcrontab"
}
+remove_cronjob()
+{
+ setup_cronjob deinstall
+}
+
deinstall_certs()
{
local cinst="${oldinstcfg[PREFIX]}/bin/cinst"
@@ -220,6 +227,9 @@
deinstall_etc()
{
+ echo "Removing cron job ..."
+ remove_cronjob
+
# FIXME: delete all files created by the application.
local tbcfg_file="${instcfg_path}/TrustBridge.ini"
More information about the Trustbridge-commits
mailing list