summaryrefslogtreecommitdiff
path: root/java/jboss5/files/startup.sh
diff options
context:
space:
mode:
authorHerve Quiroz <hq@FreeBSD.org>2004-12-22 20:44:23 +0000
committerHerve Quiroz <hq@FreeBSD.org>2004-12-22 20:44:23 +0000
commitf1aa6ae264c2cb227528936995cc0b4b3d521f18 (patch)
tree9746089c3903a1800cd4e6e7a36234eab49f9033 /java/jboss5/files/startup.sh
parentFix package build. (diff)
- Fix cold-boot startup failure
- 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]
Diffstat (limited to '')
-rw-r--r--java/jboss5/files/startup.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/java/jboss5/files/startup.sh b/java/jboss5/files/startup.sh
index b4c87c7ff76f..9ee364814b6b 100644
--- a/java/jboss5/files/startup.sh
+++ b/java/jboss5/files/startup.sh
@@ -1,10 +1,8 @@
#!/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 $
+# $FreeBSD: /tmp/pcvs/ports/java/jboss5/files/Attic/startup.sh,v 1.3 2004-12-22 20:44:23 hq Exp $
#
# PROVIDE: %%APP_SHORTNAME%%
@@ -15,6 +13,8 @@
# 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%%
@@ -28,19 +28,31 @@ 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 &&
- %%CONTROL_SCRIPT%% -q ${%%APP_SHORTNAME%%_flags} start &&
+ {
+ 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} restart
+ %%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"