#!/bin/sh # # $FreeBSD: head/devel/hadoop2/files/webappproxyserver.in 364992 2014-08-15 16:20:28Z demon $ # # 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"