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}."
|
2023-05-27 18:06:44 +00:00
|
|
|
/usr/sbin/daemon -S -r -P "${pidfile}" -u "${builder_web_user}" \
|
2021-06-09 15:17:40 +00:00
|
|
|
"${procname}" ${builder_web_flags}
|
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|