albatross/packaging/rc.d/albatross_influx
2018-10-29 22:24:01 +01:00

40 lines
887 B
Bash
Executable file

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: albatross_influx
# REQUIRE: LOGIN albatross_stat
# KEYWORD: shutdown nojail
#
# Define these albatross_influx_* variables in one of these files
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/albatross_influx
# /usr/local/etc/rc.conf.d/albatross_influx
#
# albatross_influx_flags:
# Default: ""
#
. /etc/rc.subr
name=albatross_influx
rcvar=${name}_enable
desc="Albatross influx service"
load_rc_config $name
start_cmd="albatross_influx_start"
: ${albatross_influx_enable:="NO"}
: ${albatross_influx_flags:=""}
: ${albatross_influx_user:="albatross"}
pidfile="/var/run/albatross_influx.pid"
procname="/usr/local/libexec/albatross/vmmd_influx"
albatross_influx_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_influx_user}" \
"${procname}" "${albatross_influx_flags}"
}
run_rc_command "$1"