#!/bin/sh # # $FreeBSD: head/databases/hbase/files/hbase_master.in 414110 2016-04-27 14:50:24Z demon $ # # PROVIDE: hbase_master # REQUIRE: LOGIN # KEYWORD: shutdown # # hbase_master_enable (bool): Set to NO by default. # Set it to YES to enable HBase master. . /etc/rc.subr export PATH=${PATH}:%%LOCALBASE%%/bin name=hbase_master rcvar=hbase_master_enable load_rc_config "${name}" : ${hbase_master_enable:=NO} : ${hbase_master_user:=%%HBASE_USER%%} command="%%PREFIX%%/hbase/bin/hbase-daemon.sh" command_interpreter="bash" command_args='--config %%ETCDIR%% start master' stop_cmd=hbase_master_stop hbase_master_stop () { su -m ${hbase_master_user} -c "${command} --config %%ETCDIR%% stop master" } run_rc_command "$1"