[3/5] backup.pl: Stop restore of the empty pakfire.log file

Message ID 20250628134853.3312365-3-adolf.belka@ipfire.org
State Staged
Commit 3bc224d7203c014f637369bfb43850679c3cf571
Headers
Series [1/5] functions.pl: pakfir cleanup |

Commit Message

Adolf Belka June 28, 2025, 1:48 p.m. UTC
  - With the removal of the pakfire.log file from the install, this patch stops the empty
   file being restored from old backups

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/backup/backup.pl | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index 0b8272266..fe62213e8 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -345,6 +345,11 @@  restore_backup() {
                 /usr/local/bin/ipsecctrl S
         fi
 
+	if [ -e /var/log/pakfire.log ]; then
+		rm /var/log/pakfire.log
+	fi
+
+
 	return 0
 }