streamline wireguard service

This commit is contained in:
aptalca 2022-10-09 16:15:09 -04:00
parent db8e6086f4
commit a586a44219
5 changed files with 6 additions and 12 deletions

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/svc-wireguard/finish

View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
wg-quick down wg0

View File

@ -1,14 +1,3 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
_term() {
echo "Caught SIGTERM signal!"
wg-quick down wg0
}
trap _term SIGTERM
wg-quick up wg0 wg-quick up wg0
sleep infinity &
wait

View File

@ -1 +1 @@
longrun oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/svc-wireguard/run