diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-01-31 14:59:38 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-01-31 14:59:38 +0100 |
| commit | 92f9f62174e18aeee0151c0ec7ea927b835d4e08 (patch) | |
| tree | c6d980b0741b827892cc42cfacdbb10cc2809e1b | |
| parent | 8edb8f7bda7dc74109c969657a5bf089f4b6ebc8 (diff) | |
| parent | 6470ced7e3cb13f070130c06fe1f7145715f3123 (diff) | |
| download | mullvadvpn-92f9f62174e18aeee0151c0ec7ea927b835d4e08.tar.xz mullvadvpn-92f9f62174e18aeee0151c0ec7ea927b835d4e08.zip | |
Merge branch 'remove-config-files-on-uninstall'
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | dist-assets/linux/after-remove.sh | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e0fee0e9..76f49bab5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,10 @@ Line wrap the file at 100 chars. Th - Fix notifications on Windows not showing if window is unpinned and hidden. - Wait for IP interfaces to arrive before trying to configure them when using wireguard-nt. +#### Linux +- Remove auto-launch file, GUI settings and other files created by the app in user directories, when + uninstalling/purging. + ### Security - Restrict which applications are allowed to communicate with the API while in a blocking state. This prevents malicious scripts on websites from trying to do so. On Windows, only diff --git a/dist-assets/linux/after-remove.sh b/dist-assets/linux/after-remove.sh index c1ea4bafcc..8dfe875a46 100644 --- a/dist-assets/linux/after-remove.sh +++ b/dist-assets/linux/after-remove.sh @@ -11,6 +11,29 @@ function remove_logs_and_cache { function remove_config { rm -r --interactive=never /etc/mullvad-vpn || \ echo "Failed to remove mullvad-vpn config" + + # Remove app settings and auto-launcher for all users. This doesn't respect XDG_CONFIG_HOME due + # to the complexity required. + if [[ -f "/etc/passwd" ]] && command -v cut > /dev/null; then + local home_dirs + home_dirs=$(cut -d: -f6 /etc/passwd) + for home_dir in $home_dirs; do + local mullvad_dir="$home_dir/.config/Mullvad VPN" + if [[ -d "$mullvad_dir" ]]; then + echo "Removing mullvad-vpn app settings from $mullvad_dir" + rm -r --interactive=never "$mullvad_dir" || \ + echo "Failed to remove mullvad-vpn app settings" + fi + + local autostart_path="$home_dir/.config/autostart/mullvad-vpn.desktop" + # mullvad-vpn.desktop can be both a file or a symlink. + if [[ -f "$autostart_path" || -L "$autostart_path" ]]; then + echo "Removing mullvad-vpn app autostart file $autostart_path" + rm --interactive=never "$autostart_path" || \ + echo "Failed to remove mullvad-vpn autostart file" + fi + done + fi } # checking what kind of an action is taking place |
