diff options
author | Timo Kramer | 2020-02-07 19:32:33 +0100 |
---|---|---|
committer | Timo Kramer | 2020-02-07 19:32:33 +0100 |
commit | c2288262550bc9227f3624a0f1329886d2676acd (patch) | |
tree | 41de63d60ccf1f953c471f1915e0e07137913cd5 /mullvad-vpn.install | |
download | aur-c2288262550bc9227f3624a0f1329886d2676acd.tar.gz |
mullvad-vpn-cli
Diffstat (limited to 'mullvad-vpn.install')
-rw-r--r-- | mullvad-vpn.install | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mullvad-vpn.install b/mullvad-vpn.install new file mode 100644 index 000000000000..d9af43e7b1e0 --- /dev/null +++ b/mullvad-vpn.install @@ -0,0 +1,40 @@ +pre_install() { + if systemctl status mullvad-daemon &> /dev/null; then + echo 'Stopping & disabling Mullvad VPN daemon...' + systemctl disable --now mullvad-daemon + fi +} + +post_install() { + echo 'Enabling Mullvad VPN daemon...' + systemctl enable --now mullvad-daemon +} + +pre_upgrade() { + echo 'Stopping Mullvad VPN daemon...' + systemctl stop mullvad-daemon +} + +post_upgrade() { + echo 'Restarting Mullvad VPN daemon...' + systemctl daemon-reload + systemctl start mullvad-daemon +} + +pre_remove() { + # 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 +} + +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 alter config:' + echo 'e.g. vim /etc/mullvad-vpn/settings.json' + echo ------------------------------------------------------------- +} |