mirror of
https://github.com/pivpn/pivpn.git
synced 2025-01-18 18:44:29 +00:00
fixed check for when both nopass and a password argument are passed to the script
This commit is contained in:
parent
27c34aa297
commit
cd4d13691d
2 changed files with 6 additions and 5 deletions
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue