Created
January 10, 2025 03:46
-
-
Save vimagick/9437f3e35376bbf5c890adc1a504dbd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WG_HOSTS="192.168.X.1 192.168.Y.1 192.168.Z.1" | |
WG_IFACE=wg | |
for host in $WG_HOSTS; do | |
ping -q -W 1 -i 2 -c 3 $host || { ifup $WG_IFACE; break; } | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment