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