blob: 8e621bab3d8fdc6caff44fd5c68cc4f15447a3c6 (
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
34
35
36
37
|
#!/bin/sh
# PROVIDE: resourcemanager
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# resourcemanager_enable (bool): Set to NO by default.
# Set it to YES to enable resourcemanager.
. /etc/rc.subr
export PATH=${PATH}:%%LOCALBASE%%/bin
name=resourcemanager
rcvar=resourcemanager_enable
load_rc_config "${name}"
: ${resourcemanager_enable:=NO}
: ${resourcemanager_user:=%%MAPRED_USER%%}
command="%%PREFIX%%/sbin/yarn-daemon.sh"
command_interpreter_execution="%%JAVA_HOME%%/bin/java"
command_args='--config %%ETCDIR%% start resourcemanager'
stop_cmd=resourcemanager_stop
start_postcmd="start_postcmd"
status_precmd=find_pid
resourcemanager_stop () {
su -m ${resourcemanager_user} -c "${command} --config %%ETCDIR%% stop resourcemanager"
}
find_pid () {
rc_pid=$(check_pidfile $pidfile $command_interpreter_execution)
}
run_rc_command "$1"
|