Skip to content

Commit 78773ba

Browse files
committed
fix(pkgbuild): dont start connect after upgrade
1 parent 6417d16 commit 78773ba

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

pkgbuild/scripts/postinstall

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22

33
RUNNING_MARKER_FILE="/tmp/coder_desktop_running"
4-
VPN_MARKER_FILE="/tmp/coder_vpn_was_running"
54

65
# Before this script, or the user, opens the app, make sure
76
# Gatekeeper has ingested the notarization ticket.
@@ -19,14 +18,4 @@ if [ -f "$RUNNING_MARKER_FILE" ]; then
1918
echo "Coder Desktop started."
2019
fi
2120

22-
# Restart VPN if it was running before
23-
if [ -f "$VPN_MARKER_FILE" ]; then
24-
echo "Restarting CoderVPN..."
25-
echo "Sleeping for 3..."
26-
sleep 3
27-
scutil --nc start "$(scutil --nc list | grep "com.coder.Coder-Desktop" | awk -F'"' '{print $2}')"
28-
rm "$VPN_MARKER_FILE"
29-
echo "CoderVPN started."
30-
fi
31-
3221
exit 0

pkgbuild/scripts/preinstall

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env bash
22

33
RUNNING_MARKER_FILE="/tmp/coder_desktop_running"
4-
VPN_MARKER_FILE="/tmp/coder_vpn_was_running"
54

6-
rm $VPN_MARKER_FILE $RUNNING_MARKER_FILE || true
5+
rm $RUNNING_MARKER_FILE || true
76

87
if pgrep 'Coder Desktop'; then
98
touch $RUNNING_MARKER_FILE
@@ -14,9 +13,6 @@ vpn_name=$(scutil --nc list | grep "com.coder.Coder-Desktop" | awk -F'"' '{print
1413
echo "Turning off VPN"
1514
if [[ -n "$vpn_name" ]]; then
1615
echo "CoderVPN found. Stopping..."
17-
if scutil --nc status "$vpn_name" | grep -q "^Connected$"; then
18-
touch $VPN_MARKER_FILE
19-
fi
2016
scutil --nc stop "$vpn_name"
2117

2218
# Wait for VPN to be disconnected

0 commit comments

Comments
 (0)