mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-07-02 23:32:54 +00:00
Move scripts into dedicated directory
This commit is contained in:
26
scripts/entrypoint.sh
Executable file
26
scripts/entrypoint.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z $DEVICE ]; then
|
||||
DEVICE="tun0"
|
||||
fi
|
||||
|
||||
if [ ! -f "/etc/wireguard/$DEVICE.conf" ]; then
|
||||
cd /etc/wireguard
|
||||
/create-config.sh
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "add-client" == "$1" ]; then
|
||||
cd /etc/wireguard
|
||||
/add-client.sh
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Starting wg-quick on $DEVICE"
|
||||
touch "${WG_LOG_FILE}"
|
||||
wg-quick up $DEVICE
|
||||
echo "done!"
|
||||
|
||||
tail -f "${WG_LOG_FILE}"
|
Reference in New Issue
Block a user