Wireguard: add setup scripts directory

This commit is contained in:
Maciej Lebiest 2023-08-01 17:01:01 +02:00
parent d5b35cdbef
commit 99311fda66
3 changed files with 25 additions and 3 deletions

View file

@ -1,3 +1,11 @@
#!/bin/bash
wg-quick up /data/wg0.conf && exec sleep infinity
for file in /setup.d/*;
do
echo "Executing setup file $file";
bash -c "$file";
done
wg-quick up /data/wg0.conf && sleep infinity
echo "removing wg0 interface"
wg-quick down /data/wg0.conf