notes/scripts/vpnup
2025-08-25 15:25:49 -07:00

15 lines
313 B
Bash
Executable file

#!/usr/bin/env bash
main() {
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "This script must be run as root!"
exit 1
else
docker container stop pihole-unbound
chattr -i /etc/resolv.conf 2>/dev/null
sv restart NetworkManager
sv start wireguard
fi
}
main