changeset 750:27dd0012288a

Remove cron job on deinstallation.
author Sascha Wilde <wilde@intevation.de>
date Fri, 04 Jul 2014 17:18:05 +0200
parents 778382342802
children d8c8e14b9953
files packaging/linux-installer.inc.in
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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"
 

http://wald.intevation.org/projects/trustbridge/