summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Singer2017-03-13 22:01:53 +0100
committerFelix Singer2017-03-13 22:01:53 +0100
commit12271c7c1d4af642631c82d1981be6b3e193a53a (patch)
treee407b06abfdf1e48ef1f71d98ffdd36725a818f2
parente33c86203d6146f64252d07d4139e94b79484280 (diff)
downloadaur-12271c7c1d4af642631c82d1981be6b3e193a53a.tar.gz
Add upgrade functionality
-rwxr-xr-xfirefox-hardening.install13
1 files changed, 13 insertions, 0 deletions
diff --git a/firefox-hardening.install b/firefox-hardening.install
index 6b47178ee9da..ec4d6199281f 100755
--- a/firefox-hardening.install
+++ b/firefox-hardening.install
@@ -1,11 +1,24 @@
post_install() {
if [ ! -d /etc/firefox-hardening ]; then
mkdir -p /etc/firefox-hardening/prefs
+ fi
+
+ if [ ! -f /etc/firefox-hardening/ffh.conf ]; then
install -m644 -D "/usr/lib/firefox-hardening/ffh.conf.example" "/etc/firefox-hardening/ffh.conf"
fi
+
/usr/lib/firefox-hardening/beatthedeviloutofit.sh
}
+post_upgrade() {
+ if [ ! -d /etc/firefox-hardening ] || [ ! -f /etc/firefox-hardening/ffh.conf ]; then
+ post_install
+ else
+ install -m644 -D "/usr/lib/firefox-hardening/ffh.conf.example" "/etc/firefox-hardening/ffh.conf.package"
+ /usr/lib/firefox-hardening/beatthedeviloutofit.sh
+ fi
+}
+
post_remove() {
if [ -d /etc/firefox-hardening ]; then
rm -r /etc/firefox-hardening