SHA256
1
0
forked from pool/dehydrated

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
This commit is contained in:
Daniel Molkentin 2022-09-07 16:39:36 +00:00 committed by Git OBS Bridge
parent 7743484cd7
commit 68bf06642e
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Jul 23 07:56:50 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add postrun hook scripts for apache+nginx
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 8 11:38:36 UTC 2022 - Marcus Rueckert <mrueckert@suse.de> Fri Jul 8 11:38:36 UTC 2022 - Marcus Rueckert <mrueckert@suse.de>

View File

@ -202,6 +202,14 @@ install -m 0755 -d %{buildroot}%{_challengedir}
install -m 0755 -d %{buildroot}%{_sysconfdir}/%{_apache}/conf.d install -m 0755 -d %{buildroot}%{_sysconfdir}/%{_apache}/conf.d
sed "s,@CHALLENGEDIR@,%{_challengedir},g" %{SOURCE1} > acme-challenge.conf sed "s,@CHALLENGEDIR@,%{_challengedir},g" %{SOURCE1} > acme-challenge.conf
install -m 0644 acme-challenge.conf %{buildroot}%{_sysconfdir}/%{_apache}/conf.d 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} %if %{with nginx}
install -m 0755 -d %{buildroot}%{_sysconfdir}/nginx install -m 0755 -d %{buildroot}%{_sysconfdir}/nginx
@ -297,11 +305,13 @@ diff -urN docs/examples/config %{buildroot}%{_home}/config ||:
%files %{_apache} %files %{_apache}
%defattr(-,root,root) %defattr(-,root,root)
%config %{_sysconfdir}/%{_apache}/conf.d/acme-challenge.conf %config %{_sysconfdir}/%{_apache}/conf.d/acme-challenge.conf
%attr(755,root,root) %{_sysconfdir}/dehydrated/postrun-hooks.d/reload-apache2.sh
%if %{with nginx} %if %{with nginx}
%files nginx %files nginx
%defattr(-,root,root) %defattr(-,root,root)
%config %attr(640,root,nginx) %{_sysconfdir}/nginx/acme-challenge %config %attr(640,root,nginx) %{_sysconfdir}/nginx/acme-challenge
%attr(755,root,root) %{_sysconfdir}/dehydrated/postrun-hooks.d/reload-nginx.sh
%endif #with nginx %endif #with nginx
%changelog %changelog