blob: b662d5eaaef8747270abd503daa29913348e5853 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: libvirtd
# REQUIRE: LOGIN virtlogd
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable libvirtd.
#
# libvirtd_enable (bool): Set to 'YES' to enable
# Default: NO
#
# libvirtd_flags (str): Custom additional arguments to be passed to libvirtd.
# For example, to make it listen on TCP ports, set it
# to "--listen".
# Default: ""
#
. /etc/rc.subr
name=libvirtd
rcvar=libvirtd_enable
load_rc_config $name
: ${libvirtd_enable:="NO"}
: ${libvirtd_flags:=""}
command=%%PREFIX%%/sbin/libvirtd
pidfile=/var/run/${name}.pid
command_args="--daemon --pid-file=${pidfile}"
PATH="${PATH}:/usr/local/sbin:/usr/local/bin"
run_rc_command "$1"
|