From 5e3c9719c86d3288dcb9299ebee93c31a39f6f1a Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Sun, 29 Jun 2014 23:22:03 -0700 Subject: [PATCH] run: Always ensure client dir exists * OpenVPN will fail to start if this directory doesn't exist. --- bin/ovpn_run | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/ovpn_run b/bin/ovpn_run index f593ef8..5a9a28a 100755 --- a/bin/ovpn_run +++ b/bin/ovpn_run @@ -11,6 +11,10 @@ if [ ! -c /dev/net/tun ]; then mknod /dev/net/tun c 10 200 fi +if [ ! -d "$OPENVPN/ccd" ]; then + mkdir -p /etc/openvpn/ccd +fi + iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE openvpn --config "$OPENVPN/udp1194.conf"