Date: Tue, 10 Jan 2017 22:59:59 +0000 (UTC) From: Jimmy Olgeni <olgeni@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431140 - in head: . java java/wildfly10 java/wildfly10/files java/wildfly100 Message-ID: <201701102259.v0AMxxtd028335@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: olgeni Date: Tue Jan 10 22:59:58 2017 New Revision: 431140 URL: https://svnweb.freebsd.org/changeset/ports/431140 Log: Rename java/wildfly100 to java/wildfly10. PR: 212052 Submitted by: olgeni Added: head/java/wildfly10/ - copied from r431139, head/java/wildfly100/ head/java/wildfly10/files/wildfly10.in - copied unchanged from r431128, head/java/wildfly100/files/wildfly100.in Deleted: head/java/wildfly10/files/wildfly100.in head/java/wildfly100/ Modified: head/MOVED head/java/Makefile head/java/wildfly10/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Tue Jan 10 22:46:06 2017 (r431139) +++ head/MOVED Tue Jan 10 22:59:58 2017 (r431140) @@ -8977,3 +8977,4 @@ devel/rubygem-activejob|devel/rubygem-ac www/httpie|www/py-httpie|2017-01-09|Renamed to match upstream (PyPI) name sysutils/istatd|sysutils/istatserver|2017-01-09|Project was renamed devel/py-gflags|devel/py-python-gflags|2017-01-10|Rename to match PyPI naming +java/wildfly100|java/wildfly10|2017-01-10|Remove minor version number from port name Modified: head/java/Makefile ============================================================================== --- head/java/Makefile Tue Jan 10 22:46:06 2017 (r431139) +++ head/java/Makefile Tue Jan 10 22:59:58 2017 (r431140) @@ -123,7 +123,7 @@ SUBDIR += trove4j SUBDIR += veditor SUBDIR += visualvm - SUBDIR += wildfly100 + SUBDIR += wildfly10 SUBDIR += wildfly90 SUBDIR += xdoclet Modified: head/java/wildfly10/Makefile ============================================================================== --- head/java/wildfly100/Makefile Tue Jan 10 22:46:06 2017 (r431139) +++ head/java/wildfly10/Makefile Tue Jan 10 22:59:58 2017 (r431140) @@ -1,9 +1,9 @@ # Created by: Alexander Yerenkow <yerenkow@gmail.com> # $FreeBSD$ -PORTNAME= wildfly100 +PORTNAME= wildfly10 PORTVERSION= 10.0.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= java www MASTER_SITES= http://download.jboss.org/wildfly/${WILDFLY_VERSION}/ DISTNAME= wildfly-${WILDFLY_VERSION} @@ -13,7 +13,7 @@ COMMENT= Replacement for JBoss Applicati LICENSE= GPLv2 -USE_RC_SUBR= wildfly100 +USE_RC_SUBR= wildfly10 USE_JAVA= yes JAVA_VERSION= 1.7+ USER= www Copied: head/java/wildfly10/files/wildfly10.in (from r431128, head/java/wildfly100/files/wildfly100.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/wildfly10/files/wildfly10.in Tue Jan 10 22:59:58 2017 (r431140, copy of r431128, head/java/wildfly100/files/wildfly100.in) @@ -0,0 +1,97 @@ +#!/bin/sh +# +# %%APP_SHORTNAME%% startup script. +# +# $FreeBSD$ +# + +# PROVIDE: %%APP_SHORTNAME%% +# REQUIRE: NETWORKING SERVERS +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%: +# %%APP_SHORTNAME%%_enable (bool): Set to "YES" to enable %%APP_SHORTNAME%% +# %%APP_SHORTNAME%%_args (str): Optional arguments to OAJBoss +# %%APP_SHORTNAME%%_log_stdout (str) JBoss log output stdout, filename. +# %%APP_SHORTNAME%%_log_stderr (str) JBoss log output stderr, filename. +# + +. /etc/rc.subr + +name="%%APP_SHORTNAME%%" +rcvar=%%APP_SHORTNAME%%_enable +extra_commands="status" + +load_rc_config $name + +%%APP_SHORTNAME%%_logdir="%%LOG_DIR%%" +%%APP_SHORTNAME%%_enable="${%%APP_SHORTNAME%%_enable:-"NO"}" +%%APP_SHORTNAME%%_log_stdout="${%%APP_SHORTNAME%%_log_stdout:-"${%%APP_SHORTNAME%%_logdir}/log"}" +%%APP_SHORTNAME%%_log_stderr="${%%APP_SHORTNAME%%_log_stderr:-"${%%APP_SHORTNAME%%_logdir}/error"}" +%%APP_SHORTNAME%%_args="${%%APP_SHORTNAME%%_args:-""}" +%%APP_SHORTNAME%%_sleep="${%%APP_SHORTNAME%%_sleep:-"5"}" +%%APP_SHORTNAME%%_kill9="${%%APP_SHORTNAME%%_kill9:-""}" +%%APP_SHORTNAME%%_additional_killall="${%%APP_SHORTNAME%%_additional_killall:-""}" +%%APP_SHORTNAME%%_user="%%USER%%" +%%APP_SHORTNAME%%_group="%%GROUP%%" + +start_cmd="%%APP_SHORTNAME%%_start" +stop_cmd="%%APP_SHORTNAME%%_stop" +pidfile="%%PID_FILE%%" + +WILDFLY_HOME="%%APP_HOME%%" +#minimal requirements must be set for our javavmwrapper +JAVA_VERSION="1.7+" +export JAVA_VERSION + +%%APP_SHORTNAME%%_start () +{ + if [ ! -d "${%%APP_SHORTNAME%%_logdir}" ] + then + install -d -o ${%%APP_SHORTNAME%%_user} ${%%APP_SHORTNAME%%_logdir} + fi + + echo "Making sure all writeable dirs belongs to proper user/group" + chown -R ${%%APP_SHORTNAME%%_user}:${%%APP_SHORTNAME%%_group} ${WILDFLY_HOME}/standalone + echo "Starting %%APP_SHORTNAME%%." + daemon -u ${%%APP_SHORTNAME%%_user} ${WILDFLY_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_args} >> ${%%APP_SHORTNAME%%_log_stdout} 2>> ${%%APP_SHORTNAME%%_log_stderr} + + sleep ${%%APP_SHORTNAME%%_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1) + pgrep -U ${%%APP_SHORTNAME%%_user} -f ${WILDFLY_HOME}/modules > ${pidfile} + chown ${%%APP_SHORTNAME%%_user} $pidfile +} + +%%APP_SHORTNAME%%_stop () +{ + # Subvert the check_pid_file procname check. + if [ -f ${pidfile} ] + then + kill `cat ${pidfile}` + # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way. + if [ ! -z "${%%APP_SHORTNAME%%_kill9}" ] + then + sleep ${%%APP_SHORTNAME%%_sleep} + kill -9 `cat ${pidfile}` + fi + # In some setups, JBoss can spawn some child processess, which could prevent it from stopping, and freeing net ports. + # Let's blindly kill them all, since we are really know what we are doing. + if [ ! -z "${%%APP_SHORTNAME%%_additional_killall}" ] + then + sleep ${%%APP_SHORTNAME%%_sleep} + killall ${%%APP_SHORTNAME%%_additional_killall} + fi + fi +} + +%%APP_SHORTNAME%%_status () +{ + # If running, show pid + if [ -f ${pidfile} ] + then + echo "%%APP_SHORTNAME%% is running as pid" `cat ${pidfile}` + else + echo "%%APP_SHORTNAME%% is not running" + fi +} + +run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701102259.v0AMxxtd028335>