FreeBSD Bugzilla – Attachment 133645 Details for
Bug 178142
java/jboss72 update of changed github tarballs plus enhance rc script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 3.04 KB, created by
yerenkow
on 2013-04-25 14:10:00 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
yerenkow
Created:
2013-04-25 14:10:00 UTC
Size:
3.04 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># jboss72/files/jboss72.in ># >echo x - jboss72/files/jboss72.in >sed 's/^X//' >jboss72/files/jboss72.in << 'a192e971ca37e5168d8ee2a7f5ff7f28' >X#!/bin/sh >X# >X# %%APP_SHORTNAME%% startup script. >X# >X# $FreeBSD: java/jboss72/files/jboss72.in 314186 2013-03-14 21:22:00Z crees $ >X# >X >X# PROVIDE: %%APP_SHORTNAME%% >X# REQUIRE: NETWORKING SERVERS >X >X# Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%: >X# %%APP_SHORTNAME%%_enable (bool): Set to "YES" to enable %%APP_SHORTNAME%% >X# %%APP_SHORTNAME%%_jvm_opts (str): Extra JVM flags. >X# %%APP_SHORTNAME%%_args (str): Optional arguments to JBoss >X# %%APP_SHORTNAME%%_logging (str) JBoss log output. A pipe command may be used. >X# >X >X. /etc/rc.subr >X >X%%APP_SHORTNAME%%_user="%%USER%%" >X%%APP_SHORTNAME%%_logdir="%%LOG_DIR%%" >X >Xname="%%APP_SHORTNAME%%" >Xrcvar=%%APP_SHORTNAME%%_enable >X >Xload_rc_config $name >X >X%%APP_SHORTNAME%%_enable="${%%APP_SHORTNAME%%_enable:-"NO"}" >X%%APP_SHORTNAME%%_logging="${%%APP_SHORTNAME%%_logging:-">> ${%%APP_SHORTNAME%%_logdir}/stdout.log 2>> ${%%APP_SHORTNAME%%_logdir}/stderr.log"}" >X%%APP_SHORTNAME%%_sleep="${%%APP_SHORTNAME%%_sleep:-"5"}" >X%%APP_SHORTNAME%%_kill9="${%%APP_SHORTNAME%%_kill9:-""}" >X%%APP_SHORTNAME%%_additional_killall="${%%APP_SHORTNAME%%_additional_killall:-""}" >X >Xstart_cmd="%%APP_SHORTNAME%%_start" >Xstop_cmd="%%APP_SHORTNAME%%_stop" >Xpidfile="%%PID_FILE%%" >X >XJBOSS_HOME="%%APP_HOME%%" >X >X%%APP_SHORTNAME%%_start () >X{ >X if [ ! -d "${%%APP_SHORTNAME%%_logdir}" ] >X then >X mkdir -p ${%%APP_SHORTNAME%%_logdir} >X chown ${%%APP_SHORTNAME%%_user} ${%%APP_SHORTNAME%%_logdir} >X fi >X >X echo "Starting %%APP_SHORTNAME%%." >X daemon -u ${%%APP_SHORTNAME%%_user} ${JBOSS_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_logging} >> ${%%APP_SHORTNAME%%_logdir}/boot.log 2>> ${%%APP_SHORTNAME%%_logdir}/boot.log >X >X sleep ${%%APP_SHORTNAME%%_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1) >X pgrep -U ${%%APP_SHORTNAME%%_user} -f ${JBOSS_HOME}/modules > ${pidfile} >X chown ${%%APP_SHORTNAME%%_user} $pidfile >X} >X >X%%APP_SHORTNAME%%_stop () >X{ >X # Subvert the check_pid_file procname check. >X if [ -f ${pidfile} ] >X then >X kill `cat ${pidfile}` >X # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way. >X if [ ! -z "${%%APP_SHORTNAME%%_kill9}" ] >X then >X sleep ${%%APP_SHORTNAME%%_sleep} >X kill -9 `cat ${pidfile}` >X fi >X # In some setups, JBoss can spawn some child processess, which could prevent it from stopping, and freeing net ports. >X # Let's blindly kill them all, since we are really know what we are doing. >X if [ ! -z "${%%APP_SHORTNAME%%_additional_killall}" ] >X then >X sleep ${%%APP_SHORTNAME%%_sleep} >X killall ${%%APP_SHORTNAME%%_additional_killall} >X fi >X fi >X} >X >Xrun_rc_command "$1" >a192e971ca37e5168d8ee2a7f5ff7f28 >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 178142
: 133645