2 # libvirtd: guest and virtual network management daemon
5 # description: This is a daemon for managing guest instances
6 # and libvirt virtual networks
7 # See http://libvirt.org
9 # processname: libvirtd
16 if [ -n "$LIBVIRTD_CONFIG" ]; then
17 LIBVIRTD_CONFIG_ARGS="--config $LIBVIRTD_CONFIG"
20 # Source function library.
21 . /etc/rc.d/init.d/functions
24 if [ -f /etc/sysconfig/libvirtd ] ; then
25 . /etc/sysconfig/libvirtd
29 if [ -f /var/lock/subsys/libvirtd ]; then
30 msg_already_running "libvirtd"
35 msg_starting "libvirtd"
36 daemon /usr/sbin/libvirtd --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/libvirtd
42 if [ ! -f /var/lock/subsys/libvirtd ]; then
43 msg_not_running "libvirtd"
47 msg_stopping "libvirtd"
49 rm -f /var/lock/subsys/libvirtd
53 if [ ! -f /var/lock/subsys/libvirtd ]; then
54 msg_not_running "libvirtd"
59 msg_reloading libvirtd
60 killproc libvirtd -HUP
65 if [ ! -f /var/lock/subsys/libvirtd ]; then
66 msg_not_running "libvirtd"
97 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"