diff options
author | telans | 2019-08-13 20:55:47 +1200 |
---|---|---|
committer | telans | 2019-08-13 20:55:47 +1200 |
commit | 70e64be51bbe9f2f7bb0f224e1e2a92b562d44d7 (patch) | |
tree | 3f95f3fb5a752f9b49780972d2339b1a9a6c717b | |
parent | 078d170fef97663b51f539cd74ed4eff67dcf91f (diff) | |
download | aur-70e64be51bbe9f2f7bb0f224e1e2a92b562d44d7.tar.gz |
automatically enable/disable. remove logs & cache on remove
-rw-r--r-- | mullvad-vpn-beta.install | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/mullvad-vpn-beta.install b/mullvad-vpn-beta.install index a60c2504f804..49a8146b3ad2 100644 --- a/mullvad-vpn-beta.install +++ b/mullvad-vpn-beta.install @@ -1,13 +1,29 @@ -post_upgrade() { +post_install() { + systemctl enable --now mullvad-daemon + echo ------------------------------------------------------------- - echo 'You need to restart the mullvad daemon' - echo '# systemctl restart mullvad-daemon' + echo 'mullvad-daemon has been enabled & started.' echo ------------------------------------------------------------- } -post_install() { +post_upgrade() { + systemctl daemon-reload + systemctl restart mullvad-daemon + echo ------------------------------------------------------------- - echo 'Make sure to enable and run the mullvad daemon' - echo '# systemctl enable --now mullvad-daemon' + echo 'mullvad-daemon has been restarted.' echo ------------------------------------------------------------- } + +pre_remove() { + systemctl disable --now mullvad-daemon +} + +post_remove() { + # Remove logs & cache + rm -rf /var/log/mullvad-vpn/ + rm -rf /var/cache/mullvad-vpn/ + + # Remove config. See backup() + #rm -rf /etc/mullvad-vpn +}
\ No newline at end of file |