check only for exmpty config values

This commit is contained in:
Serghey Rodin 2014-10-07 00:24:49 +03:00
commit 5e6ad34026

View file

@ -24,7 +24,6 @@ source $VESTA/conf/vesta.conf
#----------------------------------------------------------# #----------------------------------------------------------#
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
check_args '2' "$#" 'USER DOMAIN [IP] [RESTART]' check_args '2' "$#" 'USER DOMAIN [IP] [RESTART]'
validate_format 'user' 'domain' validate_format 'user' 'domain'
if [ ! -z "$ip" ] ; then if [ ! -z "$ip" ] ; then
@ -49,14 +48,12 @@ if [ -z "$ip" ]; then
fi fi
# Web domain # Web domain
# Do Not restart at this point, will loose connection from API calls if [ ! -z "$WEB_SYSTEM" ]; then
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
$BIN/v-add-web-domain $user $domain $ip 'no' $BIN/v-add-web-domain $user $domain $ip 'no'
return_code=$? return_code=$?
fi fi
# Proxy support # Proxy support
# Do Not restart at this point, will loose connection from API calls
if [ ! -z "$PROXY_SYSTEM" ] && [ "$return_code" -eq 0 ]; then if [ ! -z "$PROXY_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls" extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls"
extentions="$extentions,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav" extentions="$extentions,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav"
@ -65,19 +62,15 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
fi fi
# DNS domain # DNS domain
if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'no' ]; then if [ ! -z "$DNS_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
if [ "$return_code" -eq 0 ]; then $BIN/v-add-dns-domain $user $domain $ip 'no'
$BIN/v-add-dns-domain $user $domain $ip 'no' return_code=$?
return_code=$?
fi
fi fi
# Mail domain # Mail domain
if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then if [ ! -z "$MAIL_SYSTEM" ] && [ "$return_code" -eq 0 ]; then
if [ "$return_code" -eq 0 ]; then $BIN/v-add-mail-domain $user $domain
$BIN/v-add-mail-domain $user $domain return_code=$?
return_code=$?
fi
fi fi
# Restart services # Restart services