blob: af229a7b18f5bf5ee0e1f22a11da06ce53c46eb7 (
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
|
#!/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_args='--config %%ETCDIR%% start resourcemanager'
stop_cmd=resourcemanager_stop
resourcemanager_stop () {
su -m ${resourcemanager_user} -c "${command} --config %%ETCDIR%% stop resourcemanager"
}
run_rc_command "$1"
|