gecko/mobile/installer/debian/fennec.preinst.in
Doug Turner b826426c53 Bug 533528 - If fennec is running, updates cause profile loss. r=mfinkle
--HG--
extra : rebase_source : cfb3eeab5e2dd09e78815507118adabc8dba363f
2009-12-15 00:23:55 -08:00

27 lines
451 B
Bash

#! /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