From 68bf06642e575062d937ec81eb798de0d4c3938b0536e56af409e8b889c23715 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 7 Sep 2022 16:39:36 +0000 Subject: [PATCH] Accepting request 990778 from home:bmwiedemann:branches:security:dehydrated Add postrun hook scripts for apache+nginx for nicer integration OBS-URL: https://build.opensuse.org/request/show/990778 OBS-URL: https://build.opensuse.org/package/show/security:dehydrated/dehydrated?expand=0&rev=80 --- dehydrated.changes | 5 +++++ dehydrated.spec | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/dehydrated.changes b/dehydrated.changes index 28249b0..6e674b9 100644 --- a/dehydrated.changes +++ b/dehydrated.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 23 07:56:50 UTC 2022 - Bernhard Wiedemann + +- Add postrun hook scripts for apache+nginx + ------------------------------------------------------------------- Fri Jul 8 11:38:36 UTC 2022 - Marcus Rueckert diff --git a/dehydrated.spec b/dehydrated.spec index 281ebcd..c9e64e8 100644 --- a/dehydrated.spec +++ b/dehydrated.spec @@ -202,6 +202,14 @@ install -m 0755 -d %{buildroot}%{_challengedir} install -m 0755 -d %{buildroot}%{_sysconfdir}/%{_apache}/conf.d sed "s,@CHALLENGEDIR@,%{_challengedir},g" %{SOURCE1} > acme-challenge.conf install -m 0644 acme-challenge.conf %{buildroot}%{_sysconfdir}/%{_apache}/conf.d +cat > %{buildroot}%{_sysconfdir}/dehydrated/postrun-hooks.d/reload-apache2.sh << EOF +#!/bin/sh +systemctl reload apache2.service +EOF +cat > %{buildroot}%{_sysconfdir}/dehydrated/postrun-hooks.d/reload-nginx.sh << EOF +#!/bin/sh +systemctl reload nginx.service +EOF %if %{with nginx} install -m 0755 -d %{buildroot}%{_sysconfdir}/nginx @@ -297,11 +305,13 @@ diff -urN docs/examples/config %{buildroot}%{_home}/config ||: %files %{_apache} %defattr(-,root,root) %config %{_sysconfdir}/%{_apache}/conf.d/acme-challenge.conf +%attr(755,root,root) %{_sysconfdir}/dehydrated/postrun-hooks.d/reload-apache2.sh %if %{with nginx} %files nginx %defattr(-,root,root) %config %attr(640,root,nginx) %{_sysconfdir}/nginx/acme-challenge +%attr(755,root,root) %{_sysconfdir}/dehydrated/postrun-hooks.d/reload-nginx.sh %endif #with nginx %changelog