From fa950079042c234a842185914b87d05a48c01dad Mon Sep 17 00:00:00 2001 From: zankia Date: Mon, 19 Feb 2024 00:53:45 +0100 Subject: [PATCH] fix: move backup.list to maintainer scripts --- autobackup/DEBIAN/conffiles | 2 +- autobackup/DEBIAN/control | 2 +- autobackup/DEBIAN/postinst | 9 +++++++++ autobackup/DEBIAN/prerm | 7 +++++++ autobackup/etc/autobackup/backup.list | 1 - 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 autobackup/DEBIAN/postinst create mode 100755 autobackup/DEBIAN/prerm delete mode 100644 autobackup/etc/autobackup/backup.list diff --git a/autobackup/DEBIAN/conffiles b/autobackup/DEBIAN/conffiles index 3df3eb8..5597abd 100644 --- a/autobackup/DEBIAN/conffiles +++ b/autobackup/DEBIAN/conffiles @@ -1 +1 @@ -/etc/autobackup/ +/etc/autobackup/config.properties diff --git a/autobackup/DEBIAN/control b/autobackup/DEBIAN/control index f39a106..24eef7c 100644 --- a/autobackup/DEBIAN/control +++ b/autobackup/DEBIAN/control @@ -1,5 +1,5 @@ Package: autobackup -Version: 1.3 +Version: 1.4 Architecture: all Maintainer: zankia Description: automatically backup directories on a regular basis diff --git a/autobackup/DEBIAN/postinst b/autobackup/DEBIAN/postinst new file mode 100755 index 0000000..2e833f3 --- /dev/null +++ b/autobackup/DEBIAN/postinst @@ -0,0 +1,9 @@ +#! /bin/sh + +set -e + +if [ ! -f /etc/autobackup/backup.list ]; then + echo "# Mettre ici tous les dossiers à sauvegarder. Un dossier par ligne" > /etc/autobackup/backup.list +fi + +exit 0 diff --git a/autobackup/DEBIAN/prerm b/autobackup/DEBIAN/prerm new file mode 100755 index 0000000..da9e3dd --- /dev/null +++ b/autobackup/DEBIAN/prerm @@ -0,0 +1,7 @@ +#! /bin/sh + +set -e + +rm -f /etc/autobackup/backup.list + +exit 0 diff --git a/autobackup/etc/autobackup/backup.list b/autobackup/etc/autobackup/backup.list deleted file mode 100644 index 653701f..0000000 --- a/autobackup/etc/autobackup/backup.list +++ /dev/null @@ -1 +0,0 @@ -# Mettre ici tous les dossiers à sauvegarder. Un dossier par ligne