]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/packages/libvirtd
zabbix_agent: Create /var/run/zabbix in initscript
[ipfire-2.x.git] / src / initscripts / packages / libvirtd
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/libvirtd
4 #
5 # Description : libvirtd init script
6 #
7 # Authors : Jonatan Schlag - jonatan.schlag@ipfire.org
8 #
9 # Version : 01.00
10 #
11 # Notes :
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . $rc_functions
17
18 case $1 in
19 start)
20 boot_mesg "Load required kernel modules for Libvirt"
21 modprobe tun vhost_net
22 evaluate_retval
23 boot_mesg "Starting Libvirt Daemon..."
24 loadproc /usr/sbin/libvirtd -d
25
26 ;;
27
28 stop)
29 boot_mesg "Stopping Libvirt Daemon..."
30 killproc /usr/sbin/libvirtd
31 ;;
32
33 restart)
34 $0 stop
35 sleep 1
36 $0 start
37 ;;
38
39 status)
40 statusproc /usr/sbin/libvirtd
41 ;;
42
43 *)
44 echo "Usage: $0 {start|stop|restart|status}"
45 exit 1
46 ;;
47 esac
48
49 # End $rc_base/init.d/libvirtd