From d1a1192aaa94a8695d4e4b0a7ac2d8aba1873867 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 26 Jun 2007 06:13:59 +0000 Subject: [PATCH] Updated script. Prepared for gosa-desktop package. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6684 594d385d-05f5-0310-b6e9-bd551577e9d8 --- contrib/scripts/start-gosa.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/contrib/scripts/start-gosa.sh b/contrib/scripts/start-gosa.sh index d6cd93a9c..db48be6a8 100755 --- a/contrib/scripts/start-gosa.sh +++ b/contrib/scripts/start-gosa.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Start script for GOsa to be started via mozilla +# Start script for GOsa to be started via gecko based browsers url="" if [ $# -ne 1 ]; then @@ -7,10 +7,25 @@ if [ $# -ne 1 ]; then exit 1 fi +# What browser are we using? +result="" +for browser in iceweasel firefox mozilla; do + if which $browser &> /dev/null; then + result=$browser + break + fi +done +if [ -z "$result" ]; then + echo "No suitable browser found to launch GOsa. You'll need iceweasel, firefox or mozilla in your PATH!" + exit 1 +fi +browser=$result + # Check for presence of gosa profile -if [ ! -d $HOME/.mozilla/firefox/*.gosa ]; then - firefox -CreateProfile gosa - config=`echo $HOME/.mozilla/firefox/*.gosa/` +if [ ! -d $HOME/.mozilla/$browser/*.gosa ]; then + echo "No browser profile found for GOsa - creating one..." + $browser -CreateProfile gosa + config=`echo $HOME/.mozilla/$browser/*.gosa/` cat << EOF > $config/prefs.js # Mozilla User Preferences @@ -124,5 +139,5 @@ fi # Start mozilla with GOsa profile -firefox -P gosa +$browser -P gosa -- 2.30.2