18 lines
411 B
Bash
18 lines
411 B
Bash
|
#!/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
|