Mercurial > trustbridge
changeset 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 |
files | packaging/linux-installer.inc.in |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in Fri Jul 04 18:41:23 2014 +0200 +++ b/packaging/linux-installer.inc.in Fri Jul 04 18:44:06 2014 +0200 @@ -200,10 +200,13 @@ setup_cronjob() { local tmpcrontab=`mktemp` - local crontabopt='' + if [ $SYSINST -eq 1 -a "${SUDO_USER+X}" ] ; then - crontabopt="-u $SUDO_USER" + local crontabopt="-u $SUDO_USER" + else + local crontabopt='' fi + crontab $crontabopt -l | \ grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ >"$tmpcrontab"