2
0
openvpn-ldap-testbed/scripts/client.example.test/usr/sbin/entrypoint.sh

18 lines
411 B
Bash
Raw Normal View History

2023-10-04 00:36:16 +02:00
#!/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