File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ source $HESTIA/conf/hestia.conf
2525# Verifications #
2626# ----------------------------------------------------------#
2727check_args ' 2' " $# " ' USER DOMAIN [IP] [RESTART]'
28- is_format_valid ' user' ' domain'
28+ is_format_valid ' user' ' domain' ' restart '
2929if [ ! -z " $ip " ] ; then
3030 is_format_valid ' ip'
3131fi
Original file line number Diff line number Diff line change 1313user=$1
1414domain=$2
1515aliases=$3
16- mail=$4
16+ mail=${4 // }
1717
1818# Includes
1919source $HESTIA /func/main.sh
@@ -67,7 +67,11 @@ check_args '2' "$#" 'USER DOMAIN [ALIASES] [MAIL]'
6767is_format_valid ' user' ' domain' ' aliases'
6868is_object_valid ' user' ' USER' " $user "
6969is_object_unsuspended ' user' ' USER' " $user "
70- if [[ -z " ${mail// } " ]] || [ " $mail " = ' no' ]; then
70+ if [ ! -z " $mail " ]; then
71+ is_boolean_format_valid " $mail " ' mail'
72+ fi
73+
74+ if [ " $mail " = ' no' ]; then
7175 mail=' '
7276 is_system_enabled " $WEB_SYSTEM " ' WEB_SYSTEM'
7377 is_object_valid ' web' ' DOMAIN' " $domain "
You can’t perform that action at this time.
0 commit comments