HestiaCP 7 лет назад
Родитель
Сommit
3b8cdfd259
2 измененных файлов с 7 добавлено и 2 удалено
  1. 5 0
      bin/v-backup-users
  2. 2 2
      func/main.sh

+ 5 - 0
bin/v-backup-users

@@ -22,6 +22,11 @@ source $HESTIA/conf/hestia.conf
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+$BIN/v-check-vesta-license >/dev/null
+
+# Auto-repair all databases before backuping all accounts
+mysqlrepair --all-databases --check --auto-repair
+
 if [ -z "$BACKUP_SYSTEM" ]; then
 if [ -z "$BACKUP_SYSTEM" ]; then
     exit
     exit
 fi
 fi

+ 2 - 2
func/main.sh

@@ -947,10 +947,10 @@ wait_for_backup_if_it_is_not_time_for_backup() {
     then
     then
         hour=$(date +"%H");
         hour=$(date +"%H");
         while [ "$hour" -gt "6" ]; do
         while [ "$hour" -gt "6" ]; do
-            if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then
+            # if [ "$WAIT_LOOP_ENTERED" -eq 0 ]; then
                 # do something when enter sleeping state
                 # do something when enter sleeping state
                 # $BIN/v-restart-web-backend
                 # $BIN/v-restart-web-backend
-            fi
+            # fi
             WAIT_LOOP_ENTERED=1
             WAIT_LOOP_ENTERED=1
             current_date_time="`date "+%Y-%m-%d %H:%M:%S"`";
             current_date_time="`date "+%Y-%m-%d %H:%M:%S"`";
             echo "$current_date_time - wait to backup user $user - current hour is $hour";
             echo "$current_date_time - wait to backup user $user - current hour is $hour";