3 Commits e382a03c7a ... 8db37ef237

Autor SHA1 Nachricht Datum
  Emmanuel Bouthenot 8db37ef237 chore: Bump version to 2.6 vor 11 Stunden
  Emmanuel Bouthenot df34d61f80 chore(doc): Update changelog vor 11 Stunden
  Emmanuel Bouthenot 6615627c9a fix: Fix the day and month comparison so that it is always done using two digits (Closes #48) vor 11 Stunden
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen
  1. 5 1
      Changelog.md
  2. 3 3
      autopostgresqlbackup

+ 5 - 1
Changelog.md

@@ -1,8 +1,12 @@
 # Changelog
 
+## Version 2.6
+
+* Fix the day and month comparison so that it is always done using two digits (Closes: [#48](https://github.com/k0lter/autopostgresqlbackup/pull/48)
+
 ## Version 2.5
 
-* fix runtime environment by creating backup directories separately (Closes: [#43](https://github.com/k0lter/autopostgresqlbackup/issues/43)
+* Fix runtime environment by creating backup directories separately (Closes: [#43](https://github.com/k0lter/autopostgresqlbackup/issues/43)
 
 ## Version 2.4
 

+ 3 - 3
autopostgresqlbackup

@@ -25,7 +25,7 @@
 PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/postgres/bin:/usr/local/pgsql/bin
 HOMEPAGE="https://github.com/k0lter/autopostgresqlbackup"
 NAME="AutoPostgreSQLBackup"         # Script name
-VERSION="2.5"                       # Version Number
+VERSION="2.6"                       # Version Number
 DATE="$(date '+%Y-%m-%d_%Hh%Mm')"   # Datestamp e.g 2002-09-21
 DNOW="$(date '+%u')"                # Day number of the week 1 to 7 where 1 represents Monday
 DNOM="$(date '+%d')"                # Date of the Month e.g. 27
@@ -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