linuxShortcuts/Services/afterWakeUp.sh
Bruno Fontes 2964dc1404 Generic updates on laptop
Again, I don't need to keep track of the changes. Just a matter of
having them here.
2021-12-24 11:01:28 -03:00

12 lines
285 B
Bash
Executable File

#/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