#!/bin/sh ############################################## # IceWeasel-Hardened Jail and Cleaner Script # ############################################## echo "Closing any other instances of IceWeasel to avoid crashes..." pkill iceweasel wait echo "Copying Hardened Prefs..." cp /usr/lib/iceweasel/browser/defaults/preferences/iceweasel-branding.js /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js wait echo "Waking the IceWeasel..." # Trap cleaner function for IceWeasel exit cleaning function finish { echo "Removing hardened preferences..." echo "" > /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js } ## Firejail IceWeasel startup firejail --seccomp --noroot --nogroups --caps.drop=all --private-etc=/etc/user.js --private-bin=bash,sed,ls,cat,iceweasel --private-tmp --private-home=~/.mozilla --whitelist=~/Downloads /usr/bin/iceweasel --private-window ## Exiting IceWeasel triggers the trap trap finish EXIT