ContainersWorkspace/wireguard/entrypoint.sh

23 lines
302 B
Bash
Raw Permalink Normal View History

2023-08-01 14:28:44 +00:00
#!/bin/bash
2023-08-01 15:40:45 +00:00
stopcontainer()
{
echo "removing wg0 interface"
wg-quick down /data/wg0.conf
echo goodbye
exit 0
}
trap stopcontainer SIGINT
2023-08-01 15:01:01 +00:00
for file in /setup.d/*;
do
echo "Executing setup file $file";
bash -c "$file";
done
2023-08-01 15:40:45 +00:00
wg-quick up /data/wg0.conf
sleep infinity &
wait $!