Copy debian install scripts
This commit is contained in:
39
mullvad-vpn-daemon/mullvad-vpn-daemon.post-deinstall
Normal file
39
mullvad-vpn-daemon/mullvad-vpn-daemon.post-deinstall
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
function remove_logs_and_cache {
|
||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
||||
echo "Failed to remove mullvad-vpn logs"
|
||||
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
||||
echo "Failed to remove mullvad-vpn cache"
|
||||
}
|
||||
|
||||
function remove_config {
|
||||
rm -r --interactive=never /etc/mullvad-vpn || \
|
||||
echo "Failed to remove mullvad-vpn config"
|
||||
}
|
||||
|
||||
function remove_symlinks {
|
||||
rm /usr/bin/mullvad-problem-report || \
|
||||
echo "Failed to remove mullvad-problem-report"
|
||||
}
|
||||
|
||||
# checking what kind of an action is taking place
|
||||
case $@ in
|
||||
# apt purge passes "purge"
|
||||
"purge")
|
||||
remove_logs_and_cache
|
||||
remove_config
|
||||
remove_symlinks
|
||||
;;
|
||||
# apt remove passes "remove"
|
||||
"remove")
|
||||
remove_symlinks
|
||||
;;
|
||||
# dnf remove passes a 0
|
||||
"0")
|
||||
remove_logs_and_cache
|
||||
remove_config
|
||||
remove_symlinks
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user