Move piframefleet dispatcher wireguard config to /opt/wireguard

This commit is contained in:
KemoNine 2020-08-04 20:59:30 +00:00
parent 3abe89ecf3
commit 1a4d12e566
4 changed files with 7 additions and 2 deletions

View File

@ -60,6 +60,7 @@ VOLUME /opt/ansible
ENV ENABLE_WIREGUARD=false ENV ENABLE_WIREGUARD=false
EXPOSE 51820/udp EXPOSE 51820/udp
VOLUME /lib/modules VOLUME /lib/modules
VOLUME /opt/wireguard
# SyncThing related 'stuff' # SyncThing related 'stuff'
ENV ENABLE_SYNCTHING=false ENV ENABLE_SYNCTHING=false

View File

@ -43,6 +43,9 @@ if [ "$ENABLE_WIREGUARD" = true ] ; then
else else
echo "**** The wireguard module is not active, please install wireguard on the host and activate the 'wg' kernel module ****" echo "**** The wireguard module is not active, please install wireguard on the host and activate the 'wg' kernel module ****"
fi fi
if [ ! -d "/opt/wireguard" ] ; then
mkdir /opt/wireguard
fi
fi fi
#################### ####################

View File

@ -8,12 +8,12 @@ fi
_term() { _term() {
echo "Caught SIGTERM signal!" echo "Caught SIGTERM signal!"
wg-quick down wg0 wg-quick down /opt/wireguard/wg0
} }
trap _term SIGTERM trap _term SIGTERM
wg-quick up wg0 wg-quick up /opt/wireguard/wg0
sleep infinity & sleep infinity &

View File

@ -23,6 +23,7 @@ sudo docker run -it \
-v /lib/modules:/lib/modules:ro \ -v /lib/modules:/lib/modules:ro \
-v /var/piframefleet/syncthing:/opt/syncthing \ -v /var/piframefleet/syncthing:/opt/syncthing \
-v /var/piframefleet/filebrowser:/opt/filebrowser \ -v /var/piframefleet/filebrowser:/opt/filebrowser \
-v /var/piframefleet/wireguard:/var/wireguard \
-v /var/piframefleet/ansible:/opt/ansible \ -v /var/piframefleet/ansible:/opt/ansible \
-v /var/piframefleet/pictures:/opt/pictures \ -v /var/piframefleet/pictures:/opt/pictures \
piframe/piframefleet:latest piframe/piframefleet:latest