File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33RUNNING_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."
2019fi
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-
3221exit 0
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33RUNNING_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
87if 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
1413echo " Turning off VPN"
1514if [[ -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
You can’t perform that action at this time.
0 commit comments