3 [ `id -u` != 0 ] && exit 1
14 if [ "$1" = "-r" ]; then
15 [ ! -e /root
/.mozilla
/firefox
/profiles.ini
] && exit 0
16 eval `grep "Path=" /root/.mozilla/firefox/profiles.ini`
17 allfiles
=`ls -A /root/.mozilla/firefox/$Path`
18 for i
in $allfiles; do
19 echo -ne "$keepfiles" |
grep -q "^$(echo "$i" | sed 's/\./\\\./g')$" ||
rm -rf /root
/.mozilla
/firefox
/$Path/$i
24 for iuser
in `find /home -maxdepth 1 -mindepth 1 -type d -printf "%f\n"`; do
25 if id
-u $iuser > /dev
/null
2>&1; then
26 [ ! -e /home
/$iuser/.mozilla
/firefox
/profiles.ini
] && continue
27 eval `grep "Path=" /home/$iuser/.mozilla/firefox/profiles.ini`
28 allfiles
=`ls -A /home/$iuser/.mozilla/firefox/$Path`
29 for i
in $allfiles; do
30 echo -ne "$keepfiles" |
grep -q "^$(echo "$i" | sed 's/\./\\\./g')$" ||
rm -rf /home
/$iuser/.mozilla
/firefox
/$Path/$i