40 lines
844 B
Plaintext
40 lines
844 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# $FreeBSD$
|
||
|
#
|
||
|
# PROVIDE: albatross_stat
|
||
|
# REQUIRE: LOGIN
|
||
|
# KEYWORD: shutdown nojail
|
||
|
#
|
||
|
# Define these albatross_stat_* variables in one of these files
|
||
|
# /etc/rc.conf
|
||
|
# /etc/rc.conf.local
|
||
|
# /etc/rc.conf.d/albatross_stat
|
||
|
# /usr/local/etc/rc.conf.d/albatross_stat
|
||
|
#
|
||
|
# albatross_stat_flags:
|
||
|
# Default: ""
|
||
|
#
|
||
|
|
||
|
. /etc/rc.subr
|
||
|
|
||
|
name=albatross_stat
|
||
|
rcvar=${name}_enable
|
||
|
desc="Albatross stat service"
|
||
|
load_rc_config $name
|
||
|
start_cmd="albatross_stat_start"
|
||
|
|
||
|
: ${albatross_stat_enable:="NO"}
|
||
|
: ${albatross_stat_flags:=""}
|
||
|
: ${albatross_stat_user:="albatross"}
|
||
|
|
||
|
pidfile="/var/run/albatross_stat.pid"
|
||
|
procname="/usr/local/libexec/albatross/vmm_stats_lwt"
|
||
|
|
||
|
albatross_stat_start () {
|
||
|
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_stat_user}" \
|
||
|
"${procname}" "${albatross_stat_flags}"
|
||
|
}
|
||
|
|
||
|
run_rc_command "$1"
|