made wg a dependency for plex service

This commit is contained in:
BuildTools 2024-12-27 13:00:23 +00:00
parent c8c020c491
commit 56d67a38c4
2 changed files with 8 additions and 4 deletions

View file

@ -1,10 +1,14 @@
#!/usr/bin/with-contenv bash
# Bring up WireGuard if not already up
if ! ip link show dev wg0 > /dev/null 2>&1; then
wg-quick up wg0
else
sleep 60
fi
# Exit after running
exit 0
# Monitor wireguard status
while true; do
if ! ip link show dev wg0 | grep -q "UP"; then
wg-quick up wg0
fi
sleep 60
done