Wireguard: add setup scripts directory
This commit is contained in:
parent
d5b35cdbef
commit
99311fda66
3 changed files with 25 additions and 3 deletions
|
@ -14,7 +14,8 @@ COPY entrypoint.sh /usr/bin/
|
|||
RUN dnf install -y \
|
||||
${PKGS} \
|
||||
&& dnf clean all &&\
|
||||
chmod +x /usr/bin/entrypoint.sh
|
||||
chmod +x /usr/bin/entrypoint.sh && \
|
||||
mkdir /setup.d
|
||||
|
||||
STOPSIGNAL SIGALRM
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue