зеркало из https://github.com/mozilla/pjs.git
27 строки
452 B
Plaintext
27 строки
452 B
Plaintext
#literal #! /bin/sh
|
|
|
|
set -e
|
|
|
|
RUNNING=`ps | grep "fennec.*/fennec" | grep -v grep | wc -l`
|
|
|
|
if [ $RUNNING -gt 0 ];
|
|
then
|
|
dbus-send --system --type=method_call --dest=mozilla.fennec /mozilla/fennec/request mozilla.fennec.quit
|
|
x=0
|
|
while [ $x -lt 10 ]
|
|
do
|
|
sleep 1
|
|
RUNNING=`ps | grep "fennec.*/fennec" | grep -v grep | wc -l`
|
|
|
|
if [ $RUNNING -eq 0 ];
|
|
then
|
|
break
|
|
fi
|
|
|
|
x=`expr $x + 1`
|
|
done
|
|
|
|
pkill -9 fennec
|
|
sleep 1
|
|
fi
|