File tree Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,5 @@ if [ $success -ne 0 ]; then
30
30
exit 1
31
31
fi
32
32
33
- status=$( mullvad status --location)
34
- relay=$( echo " $status " | sed -n ' 2 s/Relay: //p' )
35
- location=$( echo " $status " | sed -n ' 5 s/Location: //p' )
36
- echo " Successfully connected to $relay ($location )"
33
+ status=$( mullvad status)
34
+ echo " $status "
Original file line number Diff line number Diff line change @@ -41,7 +41,5 @@ if [ $success -ne 0 ]; then
41
41
exit 1
42
42
fi
43
43
44
- status=$( mullvad status --location)
45
- relay=$( echo " $status " | sed -n ' 2 s/Relay: //p' )
46
- location=$( echo " $status " | sed -n ' 5 s/Location: //p' )
47
- echo " Successfully connected to $relay ($location )"
44
+ status=$( mullvad status)
45
+ echo " $status "
Original file line number Diff line number Diff line change @@ -36,6 +36,4 @@ if [[ $status == *"Tunnel status: Disconnected"* ]]; then
36
36
exit 0
37
37
fi
38
38
39
- relay=$( echo " $status " | sed -n ' 2 s/Relay: //p' )
40
- location=$( echo " $status " | sed -n ' 5 s/Location: //p' )
41
- echo " Successfully reconnected to $relay ($location )"
39
+ echo " $status "
Original file line number Diff line number Diff line change @@ -25,18 +25,16 @@ if ! command -v mullvad &> /dev/null; then
25
25
exit 1
26
26
fi
27
27
28
- status=$( mullvad status --location )
28
+ status=$( mullvad status)
29
29
30
30
success=$?
31
31
if [ $success -ne 0 ]; then
32
32
echo " ⚠️ Failed to update VPN tunnel connection status"
33
33
exit 1
34
34
fi
35
35
36
- if [[ $status == * " Tunnel status: Disconnected" * ]]; then
36
+ if [[ $status == * " Disconnected" * ]]; then
37
37
echo " ❌ Disconnected and unsecured"
38
38
else
39
- relay=$( echo " $status " | sed -n ' 2 s/Relay: //p' )
40
- location=$( echo " $status " | sed -n ' 5 s/Location: //p' )
41
- echo " ✅ Connected to $relay ($location )"
39
+ echo " ✅ $status "
42
40
fi
You can’t perform that action at this time.
0 commit comments