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 | 18 | ||||
| -rw-r--r-- | mullvad-setup/src/main.rs | 14 |
4 files changed, 18 insertions, 18 deletions
diff --git a/dist-assets/linux/before-remove.sh b/dist-assets/linux/before-remove.sh index 602d3d09fc..6d4ec5262f 100644 --- a/dist-assets/linux/before-remove.sh +++ b/dist-assets/linux/before-remove.sh @@ -26,4 +26,4 @@ fi pkill -x "mullvad-gui" || true /opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || echo "Failed to reset firewall" -/opt/Mullvad\ VPN/resources/mullvad-setup remove-wireguard-key || echo "Failed to remove leftover WireGuard key" +/opt/Mullvad\ VPN/resources/mullvad-setup remove-device || echo "Failed to remove device from account" diff --git a/dist-assets/uninstall_macos.sh b/dist-assets/uninstall_macos.sh index 7833ba528f..b7f27302f2 100755 --- a/dist-assets/uninstall_macos.sh +++ b/dist-assets/uninstall_macos.sh @@ -23,7 +23,7 @@ sudo dscl . -delete /groups/mullvad-exclusion || echo "Failed to remove 'mullvad echo "Resetting firewall" sudo /Applications/Mullvad\ VPN.app/Contents/Resources/mullvad-setup reset-firewall -sudo /Applications/Mullvad\ VPN.app/Contents/Resources/mullvad-setup remove-wireguard-key +sudo /Applications/Mullvad\ VPN.app/Contents/Resources/mullvad-setup remove-device echo "Removing zsh shell completion symlink ..." sudo rm -f /usr/local/share/zsh/site-functions/_mullvad diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 422d6d3169..b04fadfb2d 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -712,25 +712,25 @@ !define FirewallWarningCheck '!insertmacro "FirewallWarningCheck"' # -# RemoveWireGuardKey +# RemoveCurrentDevice # -# Remove the WireGuard key from the account, if there is one +# Remove the device from the account, if there is one # -!macro RemoveWireGuardKey +!macro RemoveCurrentDevice - log::Log "RemoveWireGuardKey()" + log::Log "RemoveCurrentDevice()" Push $0 Push $1 - nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" remove-wireguard-key' + nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" remove-device' Pop $0 Pop $1 ${If} $0 != ${MVSETUP_OK} - log::LogWithDetails "RemoveWireGuardKey() failed" $1 + log::LogWithDetails "RemoveCurrentDevice() failed" $1 ${Else} - log::Log "RemoveWireGuardKey() completed successfully" + log::Log "RemoveCurrentDevice() completed successfully" ${EndIf} Pop $1 @@ -738,7 +738,7 @@ !macroend -!define RemoveWireGuardKey '!insertmacro "RemoveWireGuardKey"' +!define RemoveCurrentDevice '!insertmacro "RemoveCurrentDevice"' # @@ -1170,7 +1170,7 @@ ${If} $FullUninstall == 1 ${ClearFirewallRules} - ${RemoveWireGuardKey} + ${RemoveCurrentDevice} ${ExtractWireGuard} ${RemoveWintun} diff --git a/mullvad-setup/src/main.rs b/mullvad-setup/src/main.rs index 37061c8854..a5a4761454 100644 --- a/mullvad-setup/src/main.rs +++ b/mullvad-setup/src/main.rs @@ -17,7 +17,7 @@ lazy_static::lazy_static! { } const KEY_RETRY_INTERVAL: Duration = Duration::ZERO; -const KEY_RETRY_MAX_RETRIES: usize = 2; +const KEY_RETRY_MAX_RETRIES: usize = 4; #[repr(i32)] enum ExitStatus { @@ -63,8 +63,8 @@ pub enum Error { #[error(display = "Failed to initialize mullvad RPC runtime")] RpcInitializationError(#[error(source)] mullvad_rpc::Error), - #[error(display = "Failed to remove WireGuard key for account")] - RemoveKeyError(#[error(source)] mullvad_rpc::rest::Error), + #[error(display = "Failed to remove device from account")] + RemoveDeviceError(#[error(source)] mullvad_rpc::rest::Error), #[error(display = "Failed to obtain settings directory path")] SettingsPathError(#[error(source)] SettingsPathErrorType), @@ -90,7 +90,7 @@ async fn main() { App::new("prepare-restart") .about("Move a running daemon into a blocking state and save its target state"), App::new("reset-firewall").about("Remove any firewall rules introduced by the daemon"), - App::new("remove-wireguard-key").about("Removes the WireGuard key from the active account"), + App::new("remove-device").about("Remove the current device from the active account"), App::new("is-older-version") .about("Checks whether the given version is older than the current version") .arg( @@ -113,7 +113,7 @@ async fn main() { let result = match matches.subcommand() { Some(("prepare-restart", _)) => prepare_restart().await, Some(("reset-firewall", _)) => reset_firewall().await, - Some(("remove-wireguard-key", _)) => remove_wireguard_key().await, + Some(("remove-device", _)) => remove_device().await, Some(("is-older-version", sub_matches)) => { let old_version = sub_matches.value_of("OLDVERSION").unwrap(); match is_older_version(old_version).await { @@ -162,7 +162,7 @@ async fn reset_firewall() -> Result<(), Error> { .map_err(Error::FirewallError) } -async fn remove_wireguard_key() -> Result<(), Error> { +async fn remove_device() -> Result<(), Error> { let (cache_path, settings_path) = get_paths()?; let (mut cacher, data) = mullvad_daemon::device::DeviceCacher::new(&settings_path) .await @@ -192,7 +192,7 @@ async fn remove_wireguard_key() -> Result<(), Error> { KEY_RETRY_MAX_RETRIES, ) .await - .map_err(Error::RemoveKeyError)?; + .map_err(Error::RemoveDeviceError)?; cacher .write(None) |
