diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-09-06 21:00:52 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-09-07 14:45:56 +0200 |
| commit | b7b2091ccb77801db8e274715286e0df1eee8782 (patch) | |
| tree | 921c021a8e14924900f94787186352aca6379c5c | |
| parent | 8122b9c4ff83eff6ac4d353a0a015789ca6bf1db (diff) | |
| download | mullvadvpn-b7b2091ccb77801db8e274715286e0df1eee8782.tar.xz mullvadvpn-b7b2091ccb77801db8e274715286e0df1eee8782.zip | |
Add and bundle macOS uninstall script
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rwxr-xr-x | dist-assets/uninstall_macos.sh | 40 | ||||
| -rwxr-xr-x[-rw-r--r--] | gui/packages/desktop/electron-builder.yml | 2 |
3 files changed, 45 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cb9ffc0bae..1893edffff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,9 @@ Line wrap the file at 100 chars. Th - Add firewall rules allowing traffic to the SSDP/WS-discover multicast IP, 239.255.255.250, if local area network sharing is activated. This allows discovery of devices using these protocols. +#### macOS +- Add uninstall script that can uninstall and remove all the files installed by the app. + #### Windows - Extend uninstaller to also remove logs, cache and optionally settings. - Add installation log (%PROGRAMDATA%\Mullvad VPN\install.log). diff --git a/dist-assets/uninstall_macos.sh b/dist-assets/uninstall_macos.sh new file mode 100755 index 0000000000..df82a35fae --- /dev/null +++ b/dist-assets/uninstall_macos.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -ue + +read -p "Are you sure you want to stop and uninstall Mullvad VPN? (y/n) " +if [[ "$REPLY" =~ [Yy]$ ]]; then + echo "Uninstalling Mullvad VPN ..." +else + echo "Aborting uninstall" + exit 0 +fi + +echo "Stopping GUI process ..." +sudo pkill -x "Mullvad VPN" || echo "No GUI process found" + +echo "Stopping and unloading mullvad-daemon system daemon ..." +DAEMON_PLIST_PATH="/Library/LaunchDaemons/net.mullvad.daemon.plist" +sudo launchctl unload -w "$DAEMON_PLIST_PATH" +sudo rm -f "$DAEMON_PLIST_PATH" + +echo "Removing app from /Applications ..." +sudo rm -rf /Applications/Mullvad\ VPN.app + +read -p "Do you want to delete the log and cache files the app has created? (y/n) " +if [[ "$REPLY" =~ [Yy]$ ]]; then + sudo rm -rf /var/log/mullvad-vpn /var/root/Library/Caches/mullvad-vpn + for user in /Users/*; do + user_log_dir="$user/Library/Logs/Mullvad VPN" + if [[ -d "$user_log_dir" ]]; then + echo "Deleting GUI logs at $user_log_dir" + sudo rm -rf "$user_log_dir" + fi + done +fi + +read -p "Do you want to delete the Mullvad VPN settings? (y/n) " +if [[ "$REPLY" =~ [Yy]$ ]]; then + sudo rm -rf /etc/mullvad-vpn +fi + diff --git a/gui/packages/desktop/electron-builder.yml b/gui/packages/desktop/electron-builder.yml index e94bdb0d13..6a5884962d 100644..100755 --- a/gui/packages/desktop/electron-builder.yml +++ b/gui/packages/desktop/electron-builder.yml @@ -50,6 +50,8 @@ mac: to: . - from: ../../../dist-assets/binaries/macos/openvpn to: . + - from: ../../../dist-assets/uninstall_macos.sh + to: ./uninstall.sh pkg: allowAnywhere: false |
