From 9302449d76d486019c5544439e7c1219753fce22 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Thu, 24 Jul 2025 10:12:42 -0400 Subject: [PATCH] adding cron --- Makefile | 10 ++++------ Makefile.dist | 4 +--- cron/mailleur.cron | 6 ++++++ support/do_dns_tlsa.sh | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 cron/mailleur.cron diff --git a/Makefile b/Makefile index 4efc070..8754f27 100644 --- a/Makefile +++ b/Makefile @@ -214,8 +214,8 @@ install : @ install -d $(DESTDIR)/$(DATADIR)/$(APPN)/ @ install -d $(DESTDIR)/$(ETCDIR)/$(APPN)/ @ install -d $(DESTDIR)/$(ETCDIR)/$(APPN)/dovecot - @ install -d $(DESTDIR)/$(ETCDIR)/pki/$(APPN)/ @ install -d $(DESTDIR)/$(ETCDIR)/sysconfig/ + @ install -d $(DESTDIR)/$(ETCDIR)/cron.d/ @ install -d $(DESTDIR)/$(LIBDIR)/$(APPN)/ @ install -d $(DESTDIR)/$(EXECDIR)/$(APPN)/ @ install -d $(DESTDIR)/$(SPOOLDIR)/$(APPN)/mails @@ -228,14 +228,9 @@ install : conf/relayed.conf \ conf/blacklister.conf \ $(DESTDIR)/$(ETCDIR)/$(APPN) - @ echo JMPDBG - @ ls -ails $(DESTDIR)/$(ETCDIR)/$(APPN) @ cp -a \ conf/dovecot \ $(DESTDIR)/$(ETCDIR)/$(APPN)/ - @ cp -a \ - certs/root-safe_CA.pem \ - $(DESTDIR)/$(ETCDIR)/pki/$(APPN) @ cp -a \ linux \ $(DESTDIR)/$(DATADIR)/$(APPN)/ @@ -246,6 +241,9 @@ install : @ cp -a \ sysconfig \ $(DESTDIR)/$(ETCDIR)/ + @ cp -a \ + cron/$(APPN).cron \ + $(DESTDIR)/$(ETCDIR)/cron.d/ @ cp -a \ sql \ $(DESTDIR)/$(DATADIR)/$(APPN)/ diff --git a/Makefile.dist b/Makefile.dist index 2c58bce..5870801 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -42,9 +42,6 @@ tarfile : clean @ date > $(APLV)/$(APLV).build_date @ cp -a Makefile* $(APLV)/ @ cp -a app/*.c $(APLV)/app/ - @ cp -a \ - certs/root-safe_CA.pem \ - $(APLV)/certs/ @ cp -a \ conf/*.conf \ conf/dovecot \ @@ -55,6 +52,7 @@ tarfile : clean shell/getsysos.sh \ $(APLV)/shell/ @ cp -a \ + cron/ \ tools/ \ $(APLV)/ @ cp -a support/*.sh \ diff --git a/cron/mailleur.cron b/cron/mailleur.cron new file mode 100644 index 0000000..9c47678 --- /dev/null +++ b/cron/mailleur.cron @@ -0,0 +1,6 @@ +#--------------------------------------------------- +#shell script to manage rpplication ecurring homeworking task +#--------------------------------------------------- +#to update lets encrypt certificate +#1 1 1 * * mailleur PATH=/usr/sbin:$PATH /usr/lib/mailleur/support/do_dns_tlsa.sh + diff --git a/support/do_dns_tlsa.sh b/support/do_dns_tlsa.sh index 14a370e..ca9e1d2 100755 --- a/support/do_dns_tlsa.sh +++ b/support/do_dns_tlsa.sh @@ -63,6 +63,7 @@ gen_cert() #pass in production mode) certbot certonly \ --apache \ + --force-renewal \ --csr ./request.csr \ --fullchain-path ./$APPNAME-fullchain.pem \ --chain-path ./$APPNAME-chain.pem \ -- 2.47.3