unbound/unbound-keygen.service
Petr Menšík d10d20851e Do not keep keygen running, check certs each time
Rely on condition of unbound-keygen service. If it does stop after
generating them, then it will recreate also after restart later. That
might be the case if someone removes these certificates.

(cherry picked from commit 9cab78fef5)

Resolves: rhbz#2094336
2022-06-15 21:47:57 +02:00

19 lines
527 B
Desktop File

[Unit]
Description=Unbound Control Key And Certificate Generator
After=syslog.target
Before=unbound.service
ConditionPathExists=|!/etc/unbound/unbound_control.pem
ConditionPathExists=|!/etc/unbound/unbound_control.key
ConditionPathExists=|!/etc/unbound/unbound_server.pem
ConditionPathExists=|!/etc/unbound/unbound_server.key
PartOf=unbound.service
[Service]
Type=oneshot
Group=unbound
ExecStart=/usr/sbin/unbound-control-setup -d /etc/unbound/
ExecStart=/sbin/restorecon /etc/unbound/*
[Install]
WantedBy=multi-user.target