diff options
author | Mark Wagie | 2021-12-01 16:29:11 -0700 |
---|---|---|
committer | Mark Wagie | 2021-12-01 16:29:11 -0700 |
commit | 253483697b22bce2fd79247b4d51bab87b813bf2 (patch) | |
tree | 1cee3e0730a2c2ebc337ea7689268e94c5a796c8 /mullvad-vpn.install | |
parent | 31b5382257b19fb36b33c3161e7e3e2baacd862f (diff) | |
download | aur-253483697b22bce2fd79247b4d51bab87b813bf2.tar.gz |
minor PKGBUILD adjustments
Diffstat (limited to 'mullvad-vpn.install')
-rw-r--r-- | mullvad-vpn.install | 58 |
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 ------------------------------------------------------------- } |