blob: e9e1bfaf1147c8600644bc2b6a6e36ab8b5b90a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
TZ="UTC" /usr/bin/firejail --profile=/etc/firejail/firefox.profile --noroot --nogroups --caps.drop=all --private-etc=nsswitch.conf,resolv.conf --private-bin=bash,iceweasel --private-tmp --private-dev /usr/bin/iceweasel --private-window -no-remote
## Exiting Iceweasel triggers the trap
trap finish EXIT
|