diff options
| author | Emīls <emils@mullvad.net> | 2020-07-02 22:49:57 +0100 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2020-07-03 15:11:25 +0100 |
| commit | 915215840e83b28367f331bc379bf634a5638ece (patch) | |
| tree | 9367dac7e6eb28d8c4d23c5d9436d1c2e3ee2fb8 | |
| parent | 48240f36657799c46e7db16edbc47771e9d44403 (diff) | |
| download | mullvadvpn-915215840e83b28367f331bc379bf634a5638ece.tar.xz mullvadvpn-915215840e83b28367f331bc379bf634a5638ece.zip | |
Use CLI instead of mullvad-setup to clear wg keys
| -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' |
