made wg a dependency for plex service
This commit is contained in:
parent
c8c020c491
commit
56d67a38c4
2 changed files with 8 additions and 4 deletions
|
|
@ -1,10 +1,14 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
# Bring up WireGuard if not already up
|
# Bring up WireGuard if not already up
|
||||||
if ! ip link show dev wg0 > /dev/null 2>&1; then
|
if ! ip link show dev wg0 > /dev/null 2>&1; then
|
||||||
wg-quick up wg0
|
wg-quick up wg0
|
||||||
else
|
|
||||||
sleep 60
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Exit after running
|
# Monitor wireguard status
|
||||||
exit 0
|
while true; do
|
||||||
|
if ! ip link show dev wg0 | grep -q "UP"; then
|
||||||
|
wg-quick up wg0
|
||||||
|
fi
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue