blob: ae53380b7a33f80db1cd5d3863bca038d467becf (
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
32
33
34
35
36
37
38
39
|
#!/bin/sh
#
# $FreeBSD$
#
# 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"
|