gecko/mobile/installer/debian/fennec.preinst.in

27 lines
460 B
Plaintext

#literal #! /bin/sh
set -e
RUNNING=`ps -ax | 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 -ax | 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