blob: c63fac197a1f529d306683eb2b2ab1a5b929f204 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/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"
|