summaryrefslogtreecommitdiff
path: root/devel/hadoop2/files/historyserver.in
blob: 0af9e3115cfd5818e93f2076e3af15482a4b39b4 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: historyserver
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# historyserver_enable (bool):      Set to NO by default.
#                                   Set it to YES to enable resourcemanager.

. /etc/rc.subr

name=historyserver
rcvar=historyserver_enable

load_rc_config "${name}"

: ${historyserver_enable:=NO}
: ${historyserver_user:=%%MAPRED_USER%%}

command="%%PREFIX%%/sbin/mr-jobhistory-daemon.sh"
command_args='--config %%ETCDIR%% start historyserver'

stop_cmd=historyserver_stop

historyserver_stop () {
  su -m ${historyserver_user} -c "${command} --config %%ETCDIR%% stop historyserver"
}

run_rc_command "$1"