Improve restorecond systemd unit file
Use Type=forking and pass PIDFile option, this allows better tracking of the livecycle of the daemon. Only attempt to start the daemon if selinux is enabled. Drop After=syslog.target, syslog is socket activated anyway
This commit is contained in:
parent
28d63799d0
commit
1524e15303
|
@ -1,12 +1,12 @@
|
|||
[Unit]
|
||||
Description=Restorecon maintaining path file context
|
||||
After=syslog.target
|
||||
ConditionPathExists=/etc/selinux/restorecond.conf
|
||||
ConditionSecurity=selinux
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/restorecond
|
||||
RemainAfterExit=yes
|
||||
PIDFile=/var/run/restorecond.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue