fixed check for when both nopass and a password argument are passed to the script

This commit is contained in:
EWouters 2017-03-16 22:25:17 +13:00
parent 27c34aa297
commit cd4d13691d
2 changed files with 6 additions and 5 deletions

View file

@ -772,7 +772,7 @@ setClientDNS() {
confOpenVPN() {
SERVER_NAME="server"
if [[ ${useUpdateVars} == false ]]; then
# Ask user for desired level of encryption
ENCRYPT=$(whiptail --backtitle "Setup OpenVPN" --title "Encryption Strength" --radiolist \

View file

@ -168,10 +168,11 @@ fi
cd /etc/openvpn/easy-rsa || exit
if [[ "${NO_PASS}" =~ "1" ]]; then
keynoPASS
elif [[ -n "${PASSWD}" ]]; then
echo "Both nopass and password arguments passed to the script. Please use either one."
exit 1
if [[ -n "${PASSWD}" ]]; then
echo "Both nopass and password arguments passed to the script. Please use either one."
exit 1
else
keynoPASS
else
keyPASS
fi