17 lines
259 B
Plaintext
17 lines
259 B
Plaintext
|
#!/usr/bin/with-contenv bash
|
||
|
|
||
|
# Adapted from https://github.com/linuxserver/docker-wireguard
|
||
|
|
||
|
_term() {
|
||
|
echo "Caught SIGTERM signal!"
|
||
|
wg-quick down /opt/wireguard/wg0.conf
|
||
|
}
|
||
|
|
||
|
trap _term SIGTERM
|
||
|
|
||
|
wg-quick up /opt/wireguard/wg0.conf
|
||
|
|
||
|
sleep infinity &
|
||
|
|
||
|
wait
|