Create new CREATE_TUN_DEVICE variable
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
VPN_PROVIDER="${OPENVPN_PROVIDER,,}"
|
||||
VPN_PROVIDER_CONFIGS="/etc/openvpn/${VPN_PROVIDER}"
|
||||
|
||||
# If create_tun_device is set, create /dev/net/tun
|
||||
if [[ "${CREATE_TUN_DEVICE,,}" == "true" ]]; then
|
||||
mkdir -p /dev/net
|
||||
mknod /dev/net/tun c 10 200
|
||||
chmod 0666 /dev/net/tun
|
||||
fi
|
||||
|
||||
if [[ "${OPENVPN_PROVIDER}" == "**None**" ]] || [[ -z "${OPENVPN_PROVIDER-}" ]]; then
|
||||
echo "OpenVPN provider not set. Exiting."
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user