opnsense-ports/devel/libvirt/files/libvirtd.in
Franco Fichtner 07fcd8500c */*: sync with upstream
Taken from: FreeBSD
2016-01-27 05:38:03 +01:00

37 lines
833 B
Bash

#!/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"