diff options
author | Gaming4JC <g4jc@openmailbox.org> | 2016-11-24 00:37:53 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@openmailbox.org> | 2016-11-24 00:37:53 -0500 |
commit | ec47dfb53e35dfbdf7cc7216a71b37f5509a9674 (patch) | |
tree | 90f30f9f7209ae7d3c8703a862949e23465441cc /nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh | |
parent | 9c05452e0938e0e9ca1cdc3b46028539ebd55eb7 (diff) | |
download | abslibre-ec47dfb53e35dfbdf7cc7216a71b37f5509a9674.tar.gz abslibre-ec47dfb53e35dfbdf7cc7216a71b37f5509a9674.tar.bz2 abslibre-ec47dfb53e35dfbdf7cc7216a71b37f5509a9674.zip |
better pkill attempt
Diffstat (limited to 'nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh')
-rwxr-xr-x | nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh b/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh new file mode 100755 index 000000000..d35c0bcfc --- /dev/null +++ b/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +############################################## +# IceWeasel-Hardened Jail and Cleaner Script # +############################################## +echo "Closing any other instances of IceWeasel to avoid crashes..." +pkill -x 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 +/usr/bin/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
\ No newline at end of file |