32 lines
713 B
Bash
32 lines
713 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: webappproxyserver
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# webappproxyserver_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable webappproxyserver.
|
|
|
|
. /etc/rc.subr
|
|
|
|
export PATH=${PATH}:%%LOCALBASE%%/bin
|
|
name=webappproxyserver
|
|
rcvar=webappproxyserver_enable
|
|
|
|
load_rc_config "${name}"
|
|
|
|
: ${webappproxyserver_enable:=NO}
|
|
: ${webappproxyserver_user:=%%MAPRED_USER%%}
|
|
|
|
command="%%PREFIX%%/sbin/yarn-daemon.sh"
|
|
command_args='--config %%ETCDIR%% start proxyserver'
|
|
|
|
stop_cmd=webappproxyserver_stop
|
|
|
|
webappproxyserver_stop () {
|
|
su -m ${webappproxyserver_user} -c "${command} --config %%ETCDIR%% stop proxyserver"
|
|
}
|
|
|
|
run_rc_command "$1"
|