blob: d6bb942384115a5f80ecde1c01bfad7d6bb2ac10 (
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: %%APP_SHORTNAME%%
# REQUIRE: NETWORKING SERVERS
# KEYWORD: shutdown
. /etc/rc.subr
name="geronimo%%GERONIMO_VERSION%%"
rcvar=geronimo%%GERONIMO_VERSION%%_enable
pidfile="%%PID_FILE%%"
export JAVA_HOME=%%JAVA_HOME%%
export JRE_HOME=$JAVA_HOME/jre
export EXT_DIRS="$JRE_HOME/lib/ext:${geronimo%%GERONIMO_VERSION%%_home}/lib/ext"
export ENDORSED_DIRS="$JRE_HOME/lib/endorsed:${geronimo%%GERONIMO_VERSION%%_home}/lib/endorsed"
export GERONIMO_PID=$pidfile
start_cmd="geronimo%%GERONIMO_VERSION%%_start"
stop_cmd="geronimo%%GERONIMO_VERSION%%_stop"
geronimo%%GERONIMO_VERSION%%_start() {
%%GERONIMO_HOME%%/bin/geronimo start
}
geronimo%%GERONIMO_VERSION%%_stop() {
rc_pid=$(check_pidfile $pidfile ${JRE_HOME}/bin/java)
echo "Stopping ${name}."
kill ${rc_pid} 2> /dev/null
wait_for_pids ${rc_pid}
rm $pidfile
}
load_rc_config "${name}"
run_rc_command "$1"
|