summaryrefslogtreecommitdiffhomepage
path: root/dist-assets/pkg-scripts
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-03-23 16:53:54 +0100
committerDavid Lönnhager <david.l@mullvad.net>2021-03-25 12:06:23 +0100
commit6f1e89f4dea2d8db5fb64e31128b3b31fa38ee7d (patch)
tree358df00a5db80994db1816f3a299fd72b906a6e2 /dist-assets/pkg-scripts
parente666c4ac81b1e69f063aa226ed3cfc3bdb7efcf8 (diff)
downloadmullvadvpn-6f1e89f4dea2d8db5fb64e31128b3b31fa38ee7d.tar.xz
mullvadvpn-6f1e89f4dea2d8db5fb64e31128b3b31fa38ee7d.zip
Kill GUI after daemon is down during upgrades
Diffstat (limited to 'dist-assets/pkg-scripts')
-rwxr-xr-xdist-assets/pkg-scripts/postinstall7
1 files changed, 4 insertions, 3 deletions
diff --git a/dist-assets/pkg-scripts/postinstall b/dist-assets/pkg-scripts/postinstall
index 0723e90f5e..7034cc15a3 100755
--- a/dist-assets/pkg-scripts/postinstall
+++ b/dist-assets/pkg-scripts/postinstall
@@ -51,12 +51,13 @@ EOM
ZSH_COMPLETIONS_DIR="/usr/local/share/zsh/site-functions/"
FISH_COMPLETIONS_DIR="/usr/local/share/fish/vendor_completions.d/"
-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"
+
+pkill -x "Mullvad VPN" || echo "Unable to kill GUI, not running?"
+sleep 1
+
echo "$DAEMON_PLIST" > $DAEMON_PLIST_PATH
launchctl load -w $DAEMON_PLIST_PATH