From 18cf2fb7fe61ae7bb0065a0458af4d77298d934d Mon Sep 17 00:00:00 2001 From: kenneyhe-zingbox <34489271+kenneyhe-zingbox@users.noreply.github.com> Date: Fri, 5 Jan 2018 08:21:10 -0800 Subject: [PATCH] fatal non default of password, clean move redundant mkdir of clients add check if password unset --- openvpn.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openvpn.sh b/openvpn.sh index fe74acc..c5292ea 100644 --- a/openvpn.sh +++ b/openvpn.sh @@ -1,7 +1,7 @@ #!/bin/bash - -ADMINPASSWORD="password" +# defaults +ADMINPASSWORD="secret" DNS1="8.8.8.8" DNS2="8.8.4.4" PROTOCOL=udp @@ -35,6 +35,7 @@ do esac done +[ "${PD}" == "secret" ] && echo "fatal: password is not set" # Detect Debian users running the script with "sh" instead of bash if readlink /proc/$$/exe | grep -qs "dash"; then @@ -248,7 +249,7 @@ verb 3" > /etc/openvpn/client-common.txt mkdir /etc/openvpn/clients/ #Setup the web server to use an self signed cert -mkdir /etc/openvpn/clients/ +# mkdir /etc/openvpn/clients/ #Set permissions for easy-rsa and open vpn to be modified by the web user. chown -R www-data:www-data /etc/openvpn/easy-rsa