Просмотр исходного кода

fix: Fix the day and month comparison so that it is always done using two digits (Closes #48)

Emmanuel Bouthenot 11 часов назад
Родитель
Сommit
6615627c9a
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      autopostgresqlbackup

+ 2 - 2
autopostgresqlbackup

@@ -915,10 +915,10 @@ if [ "${ENCRYPTION}" = "yes" ]; then
 fi
 
 log_info "Backup Start: $(date)"
-if [ "${DNOM}" = "${DOMONTHLY}" ]; then
+if [ "${DNOM}" = "${DOMONTHLY#0}" ]; then
     period="monthly"
     rotate="${BRMONTHLY}"
-elif [ "${DNOW}" = "${DOWEEKLY}" ]; then
+elif [ "${DNOW}" = "${DOWEEKLY#0}" ]; then
     period="weekly"
     rotate="${BRWEEKLY}"
 else