Mercurial > trustbridge
comparison packaging/linux-installer.inc.in @ 765:7c3a8a8d3e52
Code cleanup: make variable initialization more obvious.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 04 Jul 2014 18:44:06 +0200 |
parents | 5b505acbb2d1 |
children | 9f0ad4bab175 |
comparison
equal
deleted
inserted
replaced
764:5b505acbb2d1 | 765:7c3a8a8d3e52 |
---|---|
198 } | 198 } |
199 | 199 |
200 setup_cronjob() | 200 setup_cronjob() |
201 { | 201 { |
202 local tmpcrontab=`mktemp` | 202 local tmpcrontab=`mktemp` |
203 local crontabopt='' | 203 |
204 if [ $SYSINST -eq 1 -a "${SUDO_USER+X}" ] ; then | 204 if [ $SYSINST -eq 1 -a "${SUDO_USER+X}" ] ; then |
205 crontabopt="-u $SUDO_USER" | 205 local crontabopt="-u $SUDO_USER" |
206 fi | 206 else |
207 local crontabopt='' | |
208 fi | |
209 | |
207 crontab $crontabopt -l | \ | 210 crontab $crontabopt -l | \ |
208 grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ | 211 grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ |
209 >"$tmpcrontab" | 212 >"$tmpcrontab" |
210 if [ "$1" != "deinstall" ] ; then | 213 if [ "$1" != "deinstall" ] ; then |
211 echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \ | 214 echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \ |