summarylogtreecommitdiffstats
path: root/mullvad-vpn-cli.install
diff options
context:
space:
mode:
authorTimo Kramer2020-10-21 10:43:33 +0200
committerTimo Kramer2020-10-21 10:43:33 +0200
commit046dbef6974442f64114deac5dfb6ff12a1cea03 (patch)
treed037981566b55428c301de01615c6dffa3e1b024 /mullvad-vpn-cli.install
parent6ab792dfe648fc947a8585f9427d0fa60c864d5c (diff)
downloadaur-046dbef6974442f64114deac5dfb6ff12a1cea03.tar.gz
2020.6
Diffstat (limited to 'mullvad-vpn-cli.install')
-rw-r--r--mullvad-vpn-cli.install8
1 files changed, 6 insertions, 2 deletions
diff --git a/mullvad-vpn-cli.install b/mullvad-vpn-cli.install
index 8de2edc48b46..2df9ed3bfabf 100644
--- a/mullvad-vpn-cli.install
+++ b/mullvad-vpn-cli.install
@@ -12,9 +12,9 @@ post_install() {
/etc/mullvad-vpn/settings.json
echo 'Please edit /etc/mullvad-vpn/settings.json'
fi
+ chmod u+s "/usr/bin/mullvad-exclude"
echo 'Enabling Mullvad VPN daemon...'
systemctl enable mullvad-daemon
- chmod u+s "/usr/bin/mullvad-exclude"
echo -----------------------------------------------------------------------------------
echo 'Mullvad daemon enabled but not started because the CLI might be used remotely.'
echo 'Be aware that the daemon will be started after a reboot.'
@@ -30,17 +30,21 @@ pre_upgrade() {
}
post_upgrade() {
+ chmod u+s "/usr/bin/mullvad-exclude"
echo 'Restarting Mullvad VPN daemon...'
systemctl daemon-reload
systemctl start mullvad-daemon
- chmod u+s "/usr/bin/mullvad-exclude"
}
pre_remove() {
+ /usr/bin/mullvad account clear-history || echo "Failed to remove leftover WireGuard keys"
+
# the user might've disabled or stopped the service themselves already
echo 'Making sure the Mullvad VPN daemon is stopped & disabled...'
systemctl stop mullvad-daemon || true
systemctl disable mullvad-daemon || true
+
+ /opt/mullvad-vpn-cli/mullvad-setup reset-firewall || true
}
post_remove() {