From: Jean-Marc Pigeon (Delson) Date: Thu, 24 Jul 2025 14:12:42 +0000 (-0400) Subject: adding cron X-Git-Tag: tag-0.14~30 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=9302449d76d486019c5544439e7c1219753fce22;p=jmp%2Fmailleur adding 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 \