@@ -7,7 +7,7 @@ log_event() {
77 # Checking logging system
88 log_system=$( grep ' LOG_SYSTEM=' $V_CONF /vesta.conf | cut -f 2 -d \' )
99
10- if [ " $log_system " = ' on ' ]; then
10+ if [ " $log_system " = ' yes ' ]; then
1111 # Checking logging level
1212 log=$( grep ' LOG_LEVEL=' $V_CONF /vesta.conf| \
1313 cut -f 2 -d \' | grep -w " $level " )
@@ -342,7 +342,7 @@ is_system_enabled() {
342342 web_system=$( grep " WEB_SYSTEM=" $V_CONF /vesta.conf| cut -f 2 -d \' )
343343
344344 # Checking result
345- if [ -z " $web_system " ] || [ " $web_system " = " off " ]; then
345+ if [ -z " $web_system " ] || [ " $web_system " = " no " ]; then
346346 echo " Error: web hosting support disabled"
347347 log_event ' debug' " $E_WEB_DISABLED $V_EVENT "
348348 exit $E_WEB_DISABLED
@@ -366,7 +366,7 @@ is_system_enabled() {
366366 dns_system=$( grep " DNS_SYSTEM=" $V_CONF /vesta.conf| cut -f 2 -d \' )
367367
368368 # Checking result
369- if [ -z " $dns_system " ] || [ " $cron_system " = " off " ]; then
369+ if [ -z " $dns_system " ] || [ " $cron_system " = " no " ]; then
370370 echo " Error: dns support disabled"
371371 log_event ' debug' " $E_DNS_DISABLED $V_EVENT "
372372 exit $E_DNS_DISABLED
@@ -378,7 +378,7 @@ is_system_enabled() {
378378 cron_system=$( grep " CRON_SYSTEM=" $V_CONF /vesta.conf| cut -f 2 -d \' )
379379
380380 # Checking result
381- if [ -z " $cron_system " ] || [ " $cron_system " = " off " ]; then
381+ if [ -z " $cron_system " ] || [ " $cron_system " = " no " ]; then
382382 echo " Error: crond support disabled"
383383 log_event ' debug' " $E_CRON_DISABLED $V_EVENT "
384384 exit $E_CRON_DISABLED
@@ -390,19 +390,32 @@ is_system_enabled() {
390390 db_system=$( grep " DB_SYSTEM=" $V_CONF /vesta.conf| cut -f 2 -d \' )
391391
392392 # Checking result
393- if [ -z " $db_system " ] || [ " $db_system " = " off " ]; then
393+ if [ -z " $db_system " ] || [ " $db_system " = " no " ]; then
394394 echo " Error: db support disabled"
395395 log_event ' debug' " $E_DB_DISABLED $V_EVENT "
396396 exit $E_DB_DISABLED
397397 fi
398398 }
399399
400+ backup_function () {
401+ # Parsing config
402+ bck_system=$( grep " BACKUP_SYSTEM=" $V_CONF /vesta.conf| cut -f 2 -d \' )
403+
404+ # Checking result
405+ if [ -z " $bck_system " ] || [ " $bck_system " = " no" ]; then
406+ echo " Error: backup support disabled"
407+ log_event ' debug' " $E_BACKUP_DISABLED $V_EVENT "
408+ exit $E_BACKUP_DISABLED
409+ fi
410+ }
411+
400412 case $stype in
401413 web) web_function ;;
402414 proxy) proxy_function ;;
403415 dns) dns_function ;;
404416 cron) cron_function ;;
405417 db) db_function ;;
418+ backup) backup_function ;;
406419 * ) check_args ' 1' ' 0' ' system'
407420 esac
408421}
0 commit comments