diff options
| -rw-r--r-- | dist-assets/linux/before-remove.sh | 2 | ||||
| -rwxr-xr-x | dist-assets/uninstall_macos.sh | 2 | ||||
| -rw-r--r-- | dist-assets/windows/installer.nsh | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/dist-assets/linux/before-remove.sh b/dist-assets/linux/before-remove.sh index cb4b44bfa1..375f7eab5f 100644 --- a/dist-assets/linux/before-remove.sh +++ b/dist-assets/linux/before-remove.sh @@ -14,6 +14,8 @@ if [[ "$1" == "upgrade" ]]; then exit 0; fi +mullvad account clear-history || echo "Failed to remove leftover WireGuard keys" + if which systemctl &> /dev/null; then # the user might've disabled or stopped the service themselves already systemctl stop mullvad-daemon.service || true diff --git a/dist-assets/uninstall_macos.sh b/dist-assets/uninstall_macos.sh index 3fbae00d2a..eae0fdc1d2 100755 --- a/dist-assets/uninstall_macos.sh +++ b/dist-assets/uninstall_macos.sh @@ -13,6 +13,8 @@ fi echo "Stopping GUI process ..." sudo pkill -x "Mullvad VPN" || echo "No GUI process found" +mullvad account clear-history || echo "Failed to remove leftover WireGuard keys" + echo "Stopping and unloading mullvad-daemon system daemon ..." DAEMON_PLIST_PATH="/Library/LaunchDaemons/net.mullvad.daemon.plist" sudo launchctl unload -w "$DAEMON_PLIST_PATH" diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 8128b0862e..d14bc23740 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -734,6 +734,13 @@ nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" prepare-restart' Pop $0 Pop $1 + ${Else} + # Remove keys + SetOutPath "$TEMP" + File "${BUILD_RESOURCES_DIR}\mullvad.exe" + nsExec::ExecToStack '"$TEMP\mullvad.exe" account clear-history' + Pop $0 + Pop $1 ${EndIf} nsExec::ExecToStack '"$SYSDIR\sc.exe" stop mullvadvpn' |
