Update general/overlay/usr/sbin/wireguard

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/1882/head
Signor Pellegrino 2025-09-14 00:18:41 +03:00 committed by GitHub
parent b87c0e1693
commit aa48cf5b42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -19,5 +19,10 @@ ip link add dev wg0 type wireguard
) >>/tmp/wireguard.conf ) >>/tmp/wireguard.conf
wg setconf wg0 /tmp/wireguard.conf wg setconf wg0 /tmp/wireguard.conf
ip address add dev wg0 $(fw_printenv -n wg_address) wg_address="$(fw_printenv -n wg_address)"
if [ -z "$wg_address" ]; then
echo "Error: wg_address environment variable is not set or empty." >&2
exit 1
fi
ip address add dev wg0 "$wg_address"
ip link set up dev wg0 ip link set up dev wg0