Ver Fonte

Merge branch 'pr/5'

HestiaCP há 7 anos atrás
pai
commit
ec5bf22236
2 ficheiros alterados com 10 adições e 8 exclusões
  1. 9 8
      bin/v-backup-user
  2. 1 0
      bin/v-list-web-domain-ssl

+ 9 - 8
bin/v-backup-user

@@ -56,18 +56,19 @@ email=$(grep CONTACT $HESTIA/data/users/admin/user.conf |cut -f 2 -d \')
 
 
 # Checking load average
 # Checking load average
 la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
 la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
-i=0
+# i=0
 while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
 while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
     echo -e "$(date "+%F %T") Load Average $la"
     echo -e "$(date "+%F %T") Load Average $la"
     sleep 60
     sleep 60
-    if [ "$i" -ge "15" ]; then
-        la_error="LoadAverage $la is above threshold"
-        echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
-        sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe
-        check_result $E_LA "$la_error"
-    fi
+    wait_for_backup_if_it_is_not_time_for_backup
+    # if [ "$i" -ge "15" ]; then
+        # la_error="LoadAverage $la is above threshold"
+        # echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
+        # sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe
+        # check_result $E_LA "$la_error"
+    # fi
     la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
     la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
-    (( ++i))
+    # (( ++i))
 done
 done
 
 
 if [ -z "$BACKUP_TEMP" ]; then
 if [ -z "$BACKUP_TEMP" ]; then

+ 1 - 0
bin/v-list-web-domain-ssl

@@ -19,6 +19,7 @@ source $HESTIA/func/main.sh
 
 
 # JSON list function
 # JSON list function
 json_list() {
 json_list() {
+    issuer=$(echo "$issuer" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g")
     echo '{'
     echo '{'
     echo -e "\t\"$domain\": {"
     echo -e "\t\"$domain\": {"
     echo "        \"CRT\": \"$crt\","
     echo "        \"CRT\": \"$crt\","