From 4afbf816ab254eaae597ae04a42f7c24a0a4719f Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 14 Apr 2016 16:20:13 +0200 Subject: [PATCH] Fix errors in remote install script --- scripts/remote-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/remote-install.sh b/scripts/remote-install.sh index 8bc6b70e..b1a9c7cb 100644 --- a/scripts/remote-install.sh +++ b/scripts/remote-install.sh @@ -289,9 +289,9 @@ dev tun remote $MY_IP_ADDR 1194 udp -EOF +EOFCLIENT -cat < /etc/openvpn/udp1194.conf +cat < /etc/openvpn/udp1194.conf server 172.16.253.0 255.255.255.0 verb 3 duplicate-cn @@ -308,7 +308,7 @@ port 1194 dev tun1194 status openvpn-status-1194.log log-append /var/log/openvpn-udp1194.log -EOF +EOFUDP echo "Setup HTTP server for serving client certificate" mkdir -p /usr/share/nginx/openvpn/$UUID @@ -316,12 +316,13 @@ cp /root/client.ovpn /usr/share/nginx/openvpn/$UUID/$HOSTNAME.ovpn touch /usr/share/nginx/openvpn/$UUID/index.html touch /usr/share/nginx/openvpn/index.html -cat < /etc/nginx/sites-available/openvpn +cat < /etc/nginx/sites-available/openvpn server { listen 8003; root /usr/share/nginx/openvpn; } -EOFCLIENT +EOFNGINX + [ -f /etc/nginx/sites-enabled/openvpn ] || ln -s /etc/nginx/sites-available/openvpn /etc/nginx/sites-enabled/ service nginx stop service nginx start