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 1
1
#! /usr/bin/env bash
2
2
3
3
RUNNING_MARKER_FILE=" /tmp/coder_desktop_running"
4
- VPN_MARKER_FILE=" /tmp/coder_vpn_was_running"
5
4
6
5
# Before this script, or the user, opens the app, make sure
7
6
# Gatekeeper has ingested the notarization ticket.
@@ -19,14 +18,4 @@ if [ -f "$RUNNING_MARKER_FILE" ]; then
19
18
echo " Coder Desktop started."
20
19
fi
21
20
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
-
32
21
exit 0
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
RUNNING_MARKER_FILE=" /tmp/coder_desktop_running"
4
- VPN_MARKER_FILE=" /tmp/coder_vpn_was_running"
5
4
6
- rm $VPN_MARKER_FILE $ RUNNING_MARKER_FILE || true
5
+ rm $RUNNING_MARKER_FILE || true
7
6
8
7
if pgrep ' Coder Desktop' ; then
9
8
touch $RUNNING_MARKER_FILE
@@ -14,9 +13,6 @@ vpn_name=$(scutil --nc list | grep "com.coder.Coder-Desktop" | awk -F'"' '{print
14
13
echo " Turning off VPN"
15
14
if [[ -n " $vpn_name " ]]; then
16
15
echo " CoderVPN found. Stopping..."
17
- if scutil --nc status " $vpn_name " | grep -q " ^Connected$" ; then
18
- touch $VPN_MARKER_FILE
19
- fi
20
16
scutil --nc stop " $vpn_name "
21
17
22
18
# Wait for VPN to be disconnected
You can’t perform that action at this time.
0 commit comments