comparison 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
comparison
equal deleted inserted replaced
765:7c3a8a8d3e52 766:9f0ad4bab175
205 local crontabopt="-u $SUDO_USER" 205 local crontabopt="-u $SUDO_USER"
206 else 206 else
207 local crontabopt='' 207 local crontabopt=''
208 fi 208 fi
209 209
210 if [ "$1" != "deinstall" ] ; then
211 local trustbridge_tray_starter="${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh"
212 else
213 local trustbridge_tray_starter="${oldinstcfg[PREFIX]}/bin/trustbridge-tray-starter.sh"
214 fi
215
210 crontab $crontabopt -l | \ 216 crontab $crontabopt -l | \
211 grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ 217 grep -vF "$trustbridge_tray_starter" \
212 >"$tmpcrontab" 218 >"$tmpcrontab"
213 if [ "$1" != "deinstall" ] ; then 219 if [ "$1" != "deinstall" ] ; then
214 echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \ 220 echo "$(( $RANDOM / 555 )) 12 * * * \"$trustbridge_tray_starter\"" \
215 >>"$tmpcrontab" 221 >>"$tmpcrontab"
216 fi 222 fi
217 crontab $crontabopt "$tmpcrontab" 223 crontab $crontabopt "$tmpcrontab"
218 rm "$tmpcrontab" 224 rm "$tmpcrontab"
219 } 225 }

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