mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
remote: make system libvirtd exit when idle via timeout
Since we have socket activation available now, we can let the system libvirtd exit when it is idle. This allows it to still do autostart when the host boots up, but when nothing was started it will quickly exit again until some mgmt app connects to the socket. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2c3e08b0e3
commit
4304222f50
@ -21,7 +21,11 @@ Documentation=https://libvirt.org
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
||||
# libvirtd.service is set to run on boot so that autostart of
|
||||
# VMs can be performed. We don't want it to stick around if
|
||||
# unused though, so we set a timeout. The socket activation
|
||||
# then ensures it gets started again if anything needs it
|
||||
ExecStart=@sbindir@/libvirtd --timeout 30 $LIBVIRTD_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
Loading…
Reference in New Issue
Block a user