mirror of
https://github.com/pivpn/pivpn.git
synced 2025-03-31 04:30:22 +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() {
|
confOpenVPN() {
|
||||||
SERVER_NAME="server"
|
SERVER_NAME="server"
|
||||||
|
|
||||||
if [[ ${useUpdateVars} == false ]]; then
|
if [[ ${useUpdateVars} == false ]]; then
|
||||||
# Ask user for desired level of encryption
|
# Ask user for desired level of encryption
|
||||||
ENCRYPT=$(whiptail --backtitle "Setup OpenVPN" --title "Encryption Strength" --radiolist \
|
ENCRYPT=$(whiptail --backtitle "Setup OpenVPN" --title "Encryption Strength" --radiolist \
|
||||||
|
|
|
@ -168,10 +168,11 @@ fi
|
||||||
cd /etc/openvpn/easy-rsa || exit
|
cd /etc/openvpn/easy-rsa || exit
|
||||||
|
|
||||||
if [[ "${NO_PASS}" =~ "1" ]]; then
|
if [[ "${NO_PASS}" =~ "1" ]]; then
|
||||||
keynoPASS
|
if [[ -n "${PASSWD}" ]]; then
|
||||||
elif [[ -n "${PASSWD}" ]]; then
|
echo "Both nopass and password arguments passed to the script. Please use either one."
|
||||||
echo "Both nopass and password arguments passed to the script. Please use either one."
|
exit 1
|
||||||
exit 1
|
else
|
||||||
|
keynoPASS
|
||||||
else
|
else
|
||||||
keyPASS
|
keyPASS
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue