summarylogtreecommitdiffstats
path: root/mullvad-vpn.install
diff options
context:
space:
mode:
authorMark Wagie2021-12-01 16:27:50 -0700
committerMark Wagie2021-12-01 16:27:50 -0700
commitde670443c782d232732810491ca3fa3848768915 (patch)
tree18aaf8c1b8d824373ecdbc9ad51be6051b01019d /mullvad-vpn.install
parent9f526a4606b9bc7871b24d43cd5ae1767f760081 (diff)
downloadaur-de670443c782d232732810491ca3fa3848768915.tar.gz
minor PKGBUILD adjustments
Diffstat (limited to 'mullvad-vpn.install')
-rw-r--r--mullvad-vpn.install58
1 files changed, 29 insertions, 29 deletions
diff --git a/mullvad-vpn.install b/mullvad-vpn.install
index b348092ea0fc..cfea2e5a484d 100644
--- a/mullvad-vpn.install
+++ b/mullvad-vpn.install
@@ -1,52 +1,52 @@
pre_install() {
- if systemctl status mullvad-daemon &> /dev/null; then
- echo 'Stopping & disabling Mullvad VPN daemon...'
- /opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
- systemctl disable --now mullvad-daemon
- fi
+ if systemctl status mullvad-daemon &> /dev/null; then
+ echo 'Stopping & disabling Mullvad VPN daemon...'
+ /opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
+ systemctl disable --now mullvad-daemon
+ fi
- pkill -x "mullvad-gui" || true
+ pkill -x "mullvad-gui" || true
- rm -f /var/cache/mullvad-vpn/relays.json || true
+ rm -f /var/cache/mullvad-vpn/relays.json || true
}
post_install() {
- chmod u+s "/usr/bin/mullvad-exclude"
+ chmod u+s "/usr/bin/mullvad-exclude"
- echo 'Enabling Mullvad VPN daemon...'
- systemctl enable --now mullvad-daemon
+ echo 'Enabling Mullvad VPN daemon...'
+ systemctl enable --now mullvad-daemon
}
pre_upgrade() {
- pre_install
+ pre_install
}
post_upgrade() {
- echo 'Starting & enabling Mullvad VPN daemon...'
- systemctl daemon-reload
- systemctl enable --now mullvad-daemon
+ echo 'Starting & enabling Mullvad VPN daemon...'
+ systemctl daemon-reload
+ systemctl enable --now mullvad-daemon
- chmod u+s "/usr/bin/mullvad-exclude"
+ chmod u+s "/usr/bin/mullvad-exclude"
}
pre_remove() {
- /usr/bin/mullvad account clear-history || echo "Failed to remove leftover WireGuard keys"
+ /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
+ # 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/resources/mullvad-setup reset-firewall || true
+ /opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || true
}
post_remove() {
- echo -------------------------------------------------------------
- echo 'Optionally remove logs & cache:'
- echo 'sudo rm -rf /var/log/mullvad-vpn/'
- echo 'sudo rm -rf /var/cache/mullvad-vpn/'
- echo ''
- echo 'Optionally remove config:'
- echo 'sudo rm -rf /etc/mullvad-vpn'
- echo -------------------------------------------------------------
+ echo -------------------------------------------------------------
+ echo 'Optionally remove logs & cache:'
+ echo 'sudo rm -rf /var/log/mullvad-vpn/'
+ echo 'sudo rm -rf /var/cache/mullvad-vpn/'
+ echo ''
+ echo 'Optionally remove config:'
+ echo 'sudo rm -rf /etc/mullvad-vpn'
+ echo -------------------------------------------------------------
}