blob: bd0e58535b38be2487b705ca09c5497bd7d6e4f0 (
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
33
|
#!/bin/sh
#
# $FreeBSD$
#
# 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"
|