[Unit]
Description=libvirt locking daemon
Documentation=man:virtlockd(8)
Documentation=https://libvirt.org/
BindsTo=virtlockd.socket
Wants=virtlockd-admin.socket
After=virtlockd.socket
After=virtlockd-admin.socket

[Service]
Type=notify
Environment=VIRTLOCKD_ARGS=
EnvironmentFile=-/etc/conf.d/virtlockd
ExecStart=/usr/bin/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
# Losing this daemon is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
# sure we discourage OOM killer
OOMScoreAdjust=-900
# Raise hard limits to match behaviour of systemd >= 240.
# During startup, daemon will set soft limit to match hard limit
# per systemd recommendations
LimitNOFILE=1024:524288

[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlockd-admin.socket
