mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-17 03:25:46 +00:00
f1aa6ae264
- Add note on starting up JBoss4 with rcNG - Add new "-config" option to jboss4ctl for JBoss4 startup config - Move some notices in pkg-message [1] PR: 75345 Submitted by: maintainer Approved by: maintainer [1]
59 lines
1.6 KiB
Bash
59 lines
1.6 KiB
Bash
#!/bin/sh
|
|
#
|
|
# %%APP_TITLE%% startup script.
|
|
#
|
|
# $FreeBSD: /tmp/pcvs/ports/java/jboss5/files/Attic/startup.sh,v 1.3 2004-12-22 20:44:23 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.
|
|
# %%APP_SHORTNAME%%_config (str): Set to "" by default
|
|
# JBoss server config, eg {all|default|minimal|standard}
|
|
#
|
|
. %%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"
|
|
[ -z "$%%APP_SHORTNAME%%_config" ] && %%APP_SHORTNAME%%_config=""
|
|
|
|
%%APP_SHORTNAME%%_start ()
|
|
{
|
|
checkyesno %%APP_SHORTNAME%%_enable &&
|
|
{
|
|
if [ ! -f ${pidfile} ]
|
|
then
|
|
touch ${pidfile}
|
|
chown %%USER%%:%%GROUP%% ${pidfile}
|
|
fi
|
|
|
|
%%CONTROL_SCRIPT%% -q ${%%APP_SHORTNAME%%_flags} ${%%APP_SHORTNAME%%_configflag} ${%%APP_SHORTNAME%%_config} start &&
|
|
echo -n " %%APP_SHORTNAME%%"
|
|
}
|
|
}
|
|
|
|
%%APP_SHORTNAME%%_restart ()
|
|
{
|
|
checkyesno %%APP_SHORTNAME%%_enable &&
|
|
%%CONTROL_SCRIPT%% -q ${%%APP_SHORTNAME%%_flags} ${%%APP_SHORTNAME%%_configflag} ${%%APP_SHORTNAME%%_config} restart
|
|
}
|
|
|
|
load_rc_config $name
|
|
|
|
[ -n "${%%APP_SHORTNAME%%_config}" ] && %%APP_SHORTNAME%%_configflag="-config"
|
|
|
|
run_rc_command "$1"
|