Bug #1821 » iceweasel-hardened.sh
1 |
#!/bin/sh
|
---|---|
2 |
|
3 |
##############################################
|
4 |
# Iceweasel-Hardened Jail and Cleaner Script #
|
5 |
##############################################
|
6 |
echo "Closing any other instances of Iceweasel to avoid crashes..." |
7 |
pkill -x iceweasel
|
8 |
wait
|
9 |
echo "Copying Hardened Prefs..." |
10 |
cp /usr/lib/iceweasel/browser/defaults/preferences/iceweasel-branding.js /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js
|
11 |
wait
|
12 |
echo "Waking the Iceweasel..." |
13 |
|
14 |
# Trap cleaner function for Iceweasel exit cleaning
|
15 |
function finish { |
16 |
echo "Removing hardened preferences..." |
17 |
echo "" > /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js |
18 |
}
|
19 |
|
20 |
## Firejail Iceweasel startup
|
21 |
TZ="UTC" /usr/bin/firejail --profile=/etc/firejail/firefox.profile --noroot --nogroups --caps.drop=all --private-etc=nsswitch.conf,resolv.conf --private-bin=sh,bash,iceweasel --private-tmp --private-dev /usr/bin/iceweasel --private-window -no-remote |
22 |
|
23 |
## Exiting Iceweasel triggers the trap
|
24 |
trap finish EXIT
|
- « Previous
- 1
- 2
- Next »