libvirt/src/qemu/virtqemud.init.in
Michal Privoznik 49c6fe6201 configure: Provide OpenRC scripts for sub-daemons
There is plenty of distributions that haven't switched to
systemd nor they force their users to (Gentoo, Alpine Linux to
name a few). With the daemon split merged their only option is to
still use the monolithic daemon which will go away eventually.
Provide init scripts for these distros too.

For now, I'm not introducing config files which would correspond
to the init files except for libvirtd and virtproxyd init scripts
where it might be desirable to tweak the command line of
corresponding daemons.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-16 10:11:22 +01:00

27 lines
629 B
Plaintext

#!/sbin/openrc-run
description="Virtualization qemu daemon"
VIRTQEMUD_OPTS=${VIRTQEMUD_OPTS:-"${VIRTQEMUD_OPTS}"}
VIRTQEMUD_TIMEOUT=${VIRTQEMUD_TERMTIMEOUT:-"TERM/25/KILL/5"}
command="@sbindir@/virtqemud"
command_args="-d ${VIRTQEMUD_OPTS}"
pidfile="@runstatedir@/virtqemud.pid"
retry="${VIRTQEMUD_TERMTIMEOUT}"
extra_started_commands="reload"
description_reload="re-exec the daemon to enforce configuration reload"
depend() {
use ceph dbus iscsid virtlockd
after nfs nfsmount
}
reload() {
ebegin "re-exec() virtqemud"
start-stop-daemon --signal SIGHUP \
--exec "${command}" --pidfile "${pidfile}"
}