From 4f95966eee23338db96c32bf669232c3c8c81deb Mon Sep 17 00:00:00 2001 From: Grega Krajnc Date: Thu, 26 Oct 2023 01:33:47 +0200 Subject: [PATCH] Trying delaying approach for inserting the crontab entry. --- src/debian/destinations | 1 - src/debian/postinst | 3 ++- src/debian/rules | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100755 src/debian/rules diff --git a/src/debian/destinations b/src/debian/destinations index 709cc6b..79fef74 100644 --- a/src/debian/destinations +++ b/src/debian/destinations @@ -8,4 +8,3 @@ doc/examples/*:usr/share/doc/purge-backups/examples debian/preinst:DEBIAN debian/postinst:DEBIAN debian/postrm:DEBIAN -debian/rules:DEBIAN diff --git a/src/debian/postinst b/src/debian/postinst index d7c045b..102407f 100755 --- a/src/debian/postinst +++ b/src/debian/postinst @@ -5,7 +5,8 @@ set -e case "$1" in configure) # Add the cronjob to the current user's crontab - (crontab -l ; echo "0 0 * * * /usr/share/purge-backups/purge-backups-scheduler") | crontab - + + (crontab -l ; echo "0 0 * * * /usr/share/purge-backups/purge-backups-scheduler") | crontab - | at now + 1 minute ;; *) # Do nothing on other actions diff --git a/src/debian/rules b/src/debian/rules deleted file mode 100755 index 2497487..0000000 --- a/src/debian/rules +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ --configure-depends