Explorar o código

fix(info): get most recent backup instead of oldest (#3319)

Alex Handlovits %!s(int64=5) %!d(string=hai) anos
pai
achega
794cde8980
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lgsm/functions/info_distro.sh

+ 1 - 1
lgsm/functions/info_distro.sh

@@ -205,7 +205,7 @@ if [ -d "${backupdir}" ]; then
 		# number of backups.
 		backupcount=$(find "${backupdir}"/*.tar.gz | wc -l)
 		# most recent backup.
-		lastbackup=$(find "${backupdir}"/*.tar.gz | head -1)
+		lastbackup=$(find "${backupdir}"/*.tar.gz | tail -1)
 		# date of most recent backup.
 		lastbackupdate=$(date -r "${lastbackup}")
 		# no of days since last backup.