Mercurial > trustbridge
diff 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 |
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in Wed Sep 10 15:56:24 2014 +0200 +++ b/packaging/linux-installer.inc.in Wed Sep 10 16:18:20 2014 +0200 @@ -254,23 +254,25 @@ echo " 'sudo $0 -d'" getxt "And install it again without sudo:\n" echo " $0" + RUNCMD="su $SUDO_USER -c " else getxt "If you want to change the certificates of all users\n" getxt "uninstall it with:\n" echo " '$0 -d'" getxt "And install it again using sudo:\n" echo " sudo $0" + RUNCMD="" fi echo "#################################################################################" getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge" if [ $UPDATE -eq 0 ]; then read - "${instcfg[PREFIX]}/bin/trustbridge" & + $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" & else if [ $SHOWAFTERUPDATE -eq 0 ]; then - "${instcfg[PREFIX]}/bin/trustbridge" --tray & + $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" --tray & else - "${instcfg[PREFIX]}/bin/trustbridge" & + $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" & fi fi }