blob: b4c87c7ff76fac872239fa5e9dc79fca400fdd1b (
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
40
41
42
43
44
45
46
|
#!/bin/sh
# -*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
# %%APP_TITLE%% startup script.
#
# $FreeBSD: /tmp/pcvs/ports/java/jboss5/files/Attic/startup.sh,v 1.2 2004-12-18 02:11:35 hq Exp $
#
# PROVIDE: %%APP_SHORTNAME%%
# REQUIRE: NETWORKING SERVERS
# Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%:
# %%APP_SHORTNAME%%_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable %%APP_SHORTNAME%%
# %%APP_SHORTNAME%%_flags (str): Set to "-server" by default.
# Extra JVM flags.
#
. %%RC_SUBR%%
name="%%APP_SHORTNAME%%"
rcvar=`set_rcvar`
start_cmd="%%APP_SHORTNAME%%_start"
restart_cmd="%%APP_SHORTNAME%%_restart"
pidfile="%%PID_FILE%%"
procname="%%JAVA%%"
[ -z "$%%APP_SHORTNAME%%_enable" ] && %%APP_SHORTNAME%%_enable="NO"
[ -z "$%%APP_SHORTNAME%%_flags" ] && %%APP_SHORTNAME%%_flags="-server"
%%APP_SHORTNAME%%_start ()
{
checkyesno %%APP_SHORTNAME%%_enable &&
%%CONTROL_SCRIPT%% -q ${%%APP_SHORTNAME%%_flags} start &&
echo -n " %%APP_SHORTNAME%%"
}
%%APP_SHORTNAME%%_restart ()
{
checkyesno %%APP_SHORTNAME%%_enable &&
%%CONTROL_SCRIPT%% -q ${%%APP_SHORTNAME%%_flags} restart
}
load_rc_config $name
run_rc_command "$1"
|