Portál AbcLinuxu, 10. března 2026 16:24
#!/bin/sh
...
function check_running() {
$MOZ_CLIENT_PROGRAM 'ping()' 2>/dev/null >/dev/null
RETURN_VAL=$?
if [ "$RETURN_VAL" -eq "2" ]; then
echo 0
return 0
else
echo 1
return 1
fi
}
...
# check to see if there's an already running instance or not
ALREADY_RUNNING=`check_running`
# If there is no command line argument at all then try to open a new
# window in an already running instance.
if [ "${ALREADY_RUNNING}" -eq "1" ] && [ -z "$1" ]; then
exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null
fi
...
Je to v nejakej inej distribucii inak?
pgrep mozilla >/dev/null RETVAL=$? [ $RETVAL -eq 0 ] && echo mozilla uz bezi
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.