All systemd units now restart on failure
This commit is contained in:
parent
1559e309fe
commit
201c52ed03
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=ClamAV virus database updater
|
||||
Documentation=man:freshclam(1) man:freshclam.conf(5) https://www.clamav.net/documents
|
||||
# If user wants it run from cron, don't start the daemon.
|
||||
ConditionPathExists=!/etc/cron.d/clamav-update
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/freshclam -d --foreground=true
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
templates/Fedora/34/usr/lib/systemd/system/clamd@.service
Normal file
15
templates/Fedora/34/usr/lib/systemd/system/clamd@.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description = clamd scanner (%i) daemon
|
||||
Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
|
||||
After = syslog.target nss-lookup.target network.target
|
||||
|
||||
[Service]
|
||||
Type = forking
|
||||
ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
|
||||
# Reload the database
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
Restart = on-failure
|
||||
TimeoutStartSec=420
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
@ -49,4 +49,14 @@ template_list:
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/clamav-clamonacc.service'
|
||||
- dest: '/usr/lib/systemd/system/clamav-freshclam.service'
|
||||
group: 'root'
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/clamav-freshclam.service'
|
||||
- dest: '/usr/lib/systemd/system/clamd@.service'
|
||||
group: 'root'
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/clamd@.service'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user