diff packaging/linux-installer.inc.in @ 766:9f0ad4bab175

Fixed crontab setup for system wide (de)installation.
author Sascha Wilde <wilde@intevation.de>
date Tue, 08 Jul 2014 10:52:53 +0200
parents 7c3a8a8d3e52
children d2996be40de4
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in	Fri Jul 04 18:44:06 2014 +0200
+++ b/packaging/linux-installer.inc.in	Tue Jul 08 10:52:53 2014 +0200
@@ -207,11 +207,17 @@
       local crontabopt=''
   fi
 
+  if [ "$1" != "deinstall" ] ; then
+      local trustbridge_tray_starter="${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh"
+  else
+    local trustbridge_tray_starter="${oldinstcfg[PREFIX]}/bin/trustbridge-tray-starter.sh"
+  fi
+
   crontab $crontabopt -l | \
-      grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \
+      grep -vF "$trustbridge_tray_starter" \
            >"$tmpcrontab"
   if [ "$1" != "deinstall" ] ; then
-      echo "$(( $RANDOM / 555 )) 12  * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \
+      echo "$(( $RANDOM / 555 )) 12  * * * \"$trustbridge_tray_starter\"" \
            >>"$tmpcrontab"
   fi
   crontab $crontabopt "$tmpcrontab"

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