File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ if [ ! -z "$WEB_BACKEND" ]; then
7575 fi
7676 get_domain_backend_values
7777 backend=$( get_user_value ' $BACKEND_TEMPLATE' )
78+ if [ -z " $backend " ]; then
79+ backend=' default'
80+ fi
7881fi
7982
8083# Defining variables for add_config function
Original file line number Diff line number Diff line change 1313user=$1
1414domain=$2
1515domain_idn=$( idn -t --quiet -a " $domain " )
16- template=$3
16+ template=${3-default}
1717
1818# Includes
1919source $VESTA /func/main.sh
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ search_objects() {
341341
342342# Get user value
343343get_user_value () {
344- grep " ^${1// $/ } =" $USER_DATA /user.conf| cut -f 2 -d \ '
344+ grep " ^${1// $/ } =" $USER_DATA /user.conf | awk -F " ' " ' {print $2} '
345345}
346346
347347# Update user value in user.conf
Original file line number Diff line number Diff line change 2626 // Check empty fields
2727 if (empty ($ _POST ['v_action ' ])) $ errors [] = __ ('action ' );
2828 if (empty ($ _POST ['v_protocol ' ])) $ errors [] = __ ('protocol ' );
29- if (empty ($ _POST ['v_port ' ])) $ errors [] = __ ('port ' );
29+ if (! isset ($ _POST ['v_port ' ])) $ errors [] = __ ('port ' );
3030 if (empty ($ _POST ['v_ip ' ])) $ errors [] = __ ('ip address ' );
3131 if (!empty ($ errors [0 ])) {
3232 foreach ($ errors as $ i => $ error ) {
You can’t perform that action at this time.
0 commit comments