Add possibility to disable unbound-anchor by file presence

Resolves: RHEL-78647
This commit is contained in:
Tomas Korbar 2025-02-10 16:21:11 +01:00
parent ffc66a1f65
commit a168ec1a3e
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
D /run/unbound 0755 unbound unbound -
D /run/unbound 0775 unbound root -

View File

@ -6,5 +6,5 @@ Documentation=man:unbound-anchor(8)
Type=oneshot
User=unbound
EnvironmentFile=-/etc/sysconfig/unbound
ExecStart=/bin/bash -c 'if [ "$DISABLE_UNBOUND_ANCHOR" = "yes" ]; then echo "Updates of root keys with unbound-anchor is disabled"; else /usr/sbin/unbound-anchor $UNBOUND_ANCHOR_OPTIONS; fi'
ExecStart=/bin/bash -c 'if [ "$DISABLE_UNBOUND_ANCHOR" = "yes" ] || [ -f /run/unbound/anchor-disable ]; then echo "Updates of root keys with unbound-anchor is disabled"; else /usr/sbin/unbound-anchor $UNBOUND_ANCHOR_OPTIONS; fi'
SuccessExitStatus=1

View File

@ -449,7 +449,7 @@ popd
%doc doc/CREDITS doc/FEATURES
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-keygen.service
%attr(0755,unbound,unbound) %dir %{_rundir}/%{name}
%attr(0775,unbound,root) %dir %{_rundir}/%{name}
%attr(0644,root,root) %{_tmpfilesdir}/unbound.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/keys.d