From 5a1f7798b9c210f764f25b1d6bb1284b6cf38c93 Mon Sep 17 00:00:00 2001 From: "mconnor%myrealbox.com" Date: Tue, 1 Jun 2004 17:29:53 +0000 Subject: [PATCH] more tweaks to startup script for 177996 --- browser/app/mozilla.in | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/browser/app/mozilla.in b/browser/app/mozilla.in index 7c09f1a0f814..7e38fbc72038 100755 --- a/browser/app/mozilla.in +++ b/browser/app/mozilla.in @@ -16,7 +16,7 @@ # Reserved. # -## $Id: mozilla.in,v 1.4 2004/05/30 17:58:39 mconnor%myrealbox.com Exp $ +## $Id: mozilla.in,v 1.5 2004/06/01 17:29:53 mconnor%myrealbox.com Exp $ ## ## Usage: ## @@ -70,7 +70,7 @@ moz_pis_startstop_scripts() } #uncomment for debugging -#set -x +set -x moz_libdir=%MOZAPPDIR% MRE_HOME=%MREDIR% @@ -121,23 +121,23 @@ MOZILLA_BIN="%MOZILLA-BIN%" # The following is to check for a currently running instance. # This is taken almost verbatim from the Mozilla RPM package's launch script. -MOZ_CLIENT_PROGRAM=$curdir/mozilla-xremote-client -function check_running() { +MOZ_CLIENT_PROGRAM=$dist_bin/mozilla-xremote-client +check_running() { $MOZ_CLIENT_PROGRAM -a firefox 'ping()' 2>/dev/null >/dev/null RETURN_VAL=$? - if [ "$RETURN_VAL" -eq "2" ]; then - echo 0 - return 0 - else + if [ $RETURN_VAL -eq 0 ]; then echo 1 return 1 + else + echo 0 + return 0 fi } ALREADY_RUNNING=`check_running` - -if [ "${ALREADY_RUNNING}" -eq "1" ] && [ -z "$1" ]; then - exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null + +if [ $ALREADY_RUNNING -eq 1 ] && [ -z "$1" ]; then + exec $MOZ_CLIENT_PROGRAM -a firefox "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null fi # End of section that checks for currently running instance. - jtg