зеркало из https://github.com/mozilla/gecko-dev.git
more tweaks to startup script for 177996
This commit is contained in:
Родитель
bf2788d424
Коммит
5a1f7798b9
|
@ -16,7 +16,7 @@
|
||||||
# Reserved.
|
# 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:
|
## Usage:
|
||||||
##
|
##
|
||||||
|
@ -70,7 +70,7 @@ moz_pis_startstop_scripts()
|
||||||
}
|
}
|
||||||
|
|
||||||
#uncomment for debugging
|
#uncomment for debugging
|
||||||
#set -x
|
set -x
|
||||||
|
|
||||||
moz_libdir=%MOZAPPDIR%
|
moz_libdir=%MOZAPPDIR%
|
||||||
MRE_HOME=%MREDIR%
|
MRE_HOME=%MREDIR%
|
||||||
|
@ -121,23 +121,23 @@ MOZILLA_BIN="%MOZILLA-BIN%"
|
||||||
|
|
||||||
# The following is to check for a currently running instance.
|
# The following is to check for a currently running instance.
|
||||||
# This is taken almost verbatim from the Mozilla RPM package's launch script.
|
# This is taken almost verbatim from the Mozilla RPM package's launch script.
|
||||||
MOZ_CLIENT_PROGRAM=$curdir/mozilla-xremote-client
|
MOZ_CLIENT_PROGRAM=$dist_bin/mozilla-xremote-client
|
||||||
function check_running() {
|
check_running() {
|
||||||
$MOZ_CLIENT_PROGRAM -a firefox 'ping()' 2>/dev/null >/dev/null
|
$MOZ_CLIENT_PROGRAM -a firefox 'ping()' 2>/dev/null >/dev/null
|
||||||
RETURN_VAL=$?
|
RETURN_VAL=$?
|
||||||
if [ "$RETURN_VAL" -eq "2" ]; then
|
if [ $RETURN_VAL -eq 0 ]; then
|
||||||
echo 0
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo 1
|
echo 1
|
||||||
return 1
|
return 1
|
||||||
|
else
|
||||||
|
echo 0
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ALREADY_RUNNING=`check_running`
|
ALREADY_RUNNING=`check_running`
|
||||||
|
|
||||||
if [ "${ALREADY_RUNNING}" -eq "1" ] && [ -z "$1" ]; then
|
if [ $ALREADY_RUNNING -eq 1 ] && [ -z "$1" ]; then
|
||||||
exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null
|
exec $MOZ_CLIENT_PROGRAM -a firefox "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null
|
||||||
fi
|
fi
|
||||||
# End of section that checks for currently running instance. - jtg
|
# End of section that checks for currently running instance. - jtg
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче