diff options
| author | Pav Lucistnik <pav@FreeBSD.org> | 2007-07-29 20:16:14 +0000 |
|---|---|---|
| committer | Pav Lucistnik <pav@FreeBSD.org> | 2007-07-29 20:16:14 +0000 |
| commit | 4fdc5322c6e78fe3612cda3bb2d9228477182631 (patch) | |
| tree | fd6896779eec5cc64c993fc27384fc4b1f5c24e5 /java/jboss3/files/jboss3.in | |
| parent | Refresh old sample portbuild.conf with the one currently used for i386 (diff) | |
- Update to 3.2.8
PR: ports/110768
Submitted by: nemoliu
Approved by: maintainer (previous version, with reservations)
Notes
Notes:
svn path=/head/; revision=196647
Diffstat (limited to 'java/jboss3/files/jboss3.in')
| -rw-r--r-- | java/jboss3/files/jboss3.in | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/java/jboss3/files/jboss3.in b/java/jboss3/files/jboss3.in new file mode 100644 index 000000000000..b77e6479d88d --- /dev/null +++ b/java/jboss3/files/jboss3.in @@ -0,0 +1,58 @@ +#!/bin/sh +# +# %%APP_TITLE%% startup script. +# +# $FreeBSD$ +# + +# 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" |
