ContainersWorkspace/wireguard/entrypoint.sh
2023-08-01 17:40:45 +02:00

22 lines
307 B
Bash

#!/bin/bash
stopcontainer()
{
echo "removing wg0 interface"
wg-quick down /data/wg0.conf
echo goodbye
exit 0
}
trap stopcontainer SIGINT
for file in /setup.d/*;
do
echo "Executing setup file $file";
bash -c "$file";
done
wg-quick up /data/wg0.conf
while true; do sleep 5; done