mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 22:30:51 +00:00
12 lines
285 B
Bash
12 lines
285 B
Bash
|
#/bin/sh
|
||
|
|
||
|
sleep 10s
|
||
|
wifi=$(iwconfig 2>/dev/null | grep Quasimodo)
|
||
|
if [[ -z $wifi ]]; then
|
||
|
echo "Starting OPEN VPN"
|
||
|
/usr/bin/systemctl restart openvpn-client@archerc6.service
|
||
|
else
|
||
|
echo "At home, no VPN for you"
|
||
|
/usr/bin/systemctl stop openvpn-client@archerc6.service
|
||
|
fi
|