initial commit
This commit is contained in:
17
scripts/client.example.test/usr/sbin/entrypoint.sh
Normal file
17
scripts/client.example.test/usr/sbin/entrypoint.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
mkdir -p /dev/net
|
||||
mknod /dev/net/tun c 10 200
|
||||
chmod 600 /dev/net/tun
|
||||
|
||||
login_user=$(cat /run/secrets/login_user)
|
||||
login_password=$(cat /run/secrets/login_password)
|
||||
|
||||
cat > /etc/openvpn/client/client.example.test/login.conf << EOF
|
||||
$login_user
|
||||
$login_password
|
||||
EOF
|
||||
|
||||
chmod 600 /etc/openvpn/client/client.example.test/login.conf
|
||||
|
||||
/usr/sbin/openvpn --config /etc/openvpn/client/client.example.test.conf
|
Reference in New Issue
Block a user