summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2021-03-10 13:55:38 +0000
committerEmīls <emils@mullvad.net>2021-03-15 10:51:10 +0000
commitfd061d1529c3f7de7d2802bfb027718379adecac (patch)
tree122bafb779e3808b43dbc1d60b2f87bfcd75a001
parent38fedbc486fff7c470278859e972bfbd3b085399 (diff)
downloadmullvadvpn-fd061d1529c3f7de7d2802bfb027718379adecac.tar.xz
mullvadvpn-fd061d1529c3f7de7d2802bfb027718379adecac.zip
Copy old daemon log
-rw-r--r--CHANGELOG.md1
-rw-r--r--dist-assets/linux/before-install.sh2
-rwxr-xr-xdist-assets/pkg-scripts/postinstall2
-rw-r--r--dist-assets/windows/installer.nsh4
4 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 519f23e40c..903c8cc415 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ Line wrap the file at 100 chars. Th
- Add 51820 to list of WireGuard ports in app settings.
- Add option to connect to WireGuard relays over IPv6.
- Add Burmese translations.
+- Preserve log of old daemon instance when upgrading on Desktop.
#### Android
- Allow reaching the API server when connecting, disconnecting or in a blocked state.
diff --git a/dist-assets/linux/before-install.sh b/dist-assets/linux/before-install.sh
index d3f53a1f40..6f076b129e 100644
--- a/dist-assets/linux/before-install.sh
+++ b/dist-assets/linux/before-install.sh
@@ -6,6 +6,8 @@ if which systemctl &> /dev/null; then
/opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
systemctl stop mullvad-daemon.service
systemctl disable mullvad-daemon.service
+ cp /var/log/mullvad-vpn/daemon.log /var/log/mullvad-vpn/old-install-daemon.log \
+ || echo "Failed to copy old daemon log"
fi
fi
diff --git a/dist-assets/pkg-scripts/postinstall b/dist-assets/pkg-scripts/postinstall
index 1d8e2956b4..0723e90f5e 100755
--- a/dist-assets/pkg-scripts/postinstall
+++ b/dist-assets/pkg-scripts/postinstall
@@ -55,6 +55,8 @@ pkill -x "Mullvad VPN" || echo "Unable to kill GUI, not running?"
sleep 1
launchctl unload -w $DAEMON_PLIST_PATH
+cp "$LOG_DIR/daemon.log" "$LOG_DIR/old-install-daemon.log" \
+ || echo "Failed to copy old daemon log"
echo "$DAEMON_PLIST" > $DAEMON_PLIST_PATH
launchctl load -w $DAEMON_PLIST_PATH
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 550bbf3626..2407c0ffcf 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -847,6 +847,10 @@
Pop $0
Pop $1
+ # Copy over the daemon log from the old install for debugging purposes
+ SetShellVarContext all
+ CopyFiles /SILENT /FILESONLY "$LOCALAPPDATA\Mullvad VPN\daemon.log" "$LOCALAPPDATA\Mullvad VPN\old-install-daemon.log"
+
nsExec::ExecToStack '"$SYSDIR\sc.exe" delete mullvadvpn'
# Discard return value