comparison packaging/linux-installer.inc @ 1243:cf5784d2c3a8

(issue54) Safeguard to prohibit starting the application as root
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 24 Sep 2014 19:22:47 +0200
parents 6154d554b3af
children 3b433a350092
comparison
equal deleted inserted replaced
1242:e4aff35ef8fd 1243:cf5784d2c3a8
135 getxt "To remove the application and the root certificates it has inserted,\n" 135 getxt "To remove the application and the root certificates it has inserted,\n"
136 getxt "call the uninstall command:\n" 136 getxt "call the uninstall command:\n"
137 echo " $UN_RUNCMD ${instcfg[PREFIX]}/bin/trustbridge-uninstall.sh" 137 echo " $UN_RUNCMD ${instcfg[PREFIX]}/bin/trustbridge-uninstall.sh"
138 138
139 echo "################################################################################" 139 echo "################################################################################"
140 getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge" 140 if ! [ $(id -u) -eq 0 -a -z "$SUDO_USER" ]; then
141 getxt "or press Control-C to quit the installer.\n" 141 if [ $UPDATE -eq 0 ]; then
142 if [ $UPDATE -eq 0 ]; then 142 getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
143 read 143 getxt "or press Control-C to quit the installer.\n"
144 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" & 144 read
145 else 145 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" &
146 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" --tray & 146 else
147 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" --tray &
148 fi
147 fi 149 fi
148 } 150 }
149 151
150 cleanup() 152 cleanup()
151 { 153 {

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