builder-web/packaging/FreeBSD/rc.d/builder_web

41 lines
805 B
Text
Raw Normal View History

2021-06-09 15:17:40 +00:00
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: builder_web
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Define these builder_web_* variables in one of these files
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/builder_web
# /usr/local/etc/rc.conf.d/builder_web
#
# builder_web_flags:
# Default: ""
#
. /etc/rc.subr
name=builder_web
rcvar=${name}_enable
desc="Builder web service"
load_rc_config $name
start_cmd="builder_web_start"
: ${builder_web_enable:="NO"}
: ${builder_web_flags:=""}
: ${builder_web_user:="builder"}
pidfile="/var/run/builder_web.pid"
procname="/usr/local/libexec/builder-web"
builder_web_start () {
echo "Starting ${name}."
/usr/sbin/daemon -S -p "${pidfile}" -u "${builder_web_user}" \
"${procname}" ${builder_web_flags}
}
run_rc_command "$1"