comparison packaging/linux-installer.inc.in @ 1068:4e93a87d89eb

(issue54) use su to launch application as user after system wide installation
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 10 Sep 2014 16:18:20 +0200
parents febd195c0301
children 709a7633a2c6
comparison
equal deleted inserted replaced
1067:51b97ebc5b06 1068:4e93a87d89eb
252 getxt "If you do not want to change the certificates of other users\n" 252 getxt "If you do not want to change the certificates of other users\n"
253 getxt "uninstall it with:\n" 253 getxt "uninstall it with:\n"
254 echo " 'sudo $0 -d'" 254 echo " 'sudo $0 -d'"
255 getxt "And install it again without sudo:\n" 255 getxt "And install it again without sudo:\n"
256 echo " $0" 256 echo " $0"
257 RUNCMD="su $SUDO_USER -c "
257 else 258 else
258 getxt "If you want to change the certificates of all users\n" 259 getxt "If you want to change the certificates of all users\n"
259 getxt "uninstall it with:\n" 260 getxt "uninstall it with:\n"
260 echo " '$0 -d'" 261 echo " '$0 -d'"
261 getxt "And install it again using sudo:\n" 262 getxt "And install it again using sudo:\n"
262 echo " sudo $0" 263 echo " sudo $0"
264 RUNCMD=""
263 fi 265 fi
264 echo "#################################################################################" 266 echo "#################################################################################"
265 getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge" 267 getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
266 if [ $UPDATE -eq 0 ]; then 268 if [ $UPDATE -eq 0 ]; then
267 read 269 read
268 "${instcfg[PREFIX]}/bin/trustbridge" & 270 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" &
269 else 271 else
270 if [ $SHOWAFTERUPDATE -eq 0 ]; then 272 if [ $SHOWAFTERUPDATE -eq 0 ]; then
271 "${instcfg[PREFIX]}/bin/trustbridge" --tray & 273 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" --tray &
272 else 274 else
273 "${instcfg[PREFIX]}/bin/trustbridge" & 275 $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" &
274 fi 276 fi
275 fi 277 fi
276 } 278 }
277 279
278 cleanup() 280 cleanup()

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