From b2e5047617db7741f8c3a5dacbadd39fa4b6fbc7 Mon Sep 17 00:00:00 2001 From: jgh Date: Mon, 2 Apr 2012 23:51:25 +0000 Subject: - reorg of rc script based on standards and move from .sh => .in - bump PORTREVISION PR: ports/166445 Submitted by: jgh (me) Approved by: maintainer, 5u623l20@gmail.com Feature safe: yes --- www/resin3/Makefile | 3 ++- www/resin3/files/resin3.in | 43 +++++++++++++++++++++++++++++++++++++++++++ www/resin3/files/resin3.sh.in | 43 ------------------------------------------- 3 files changed, 45 insertions(+), 44 deletions(-) create mode 100644 www/resin3/files/resin3.in delete mode 100644 www/resin3/files/resin3.sh.in (limited to 'www/resin3') diff --git a/www/resin3/Makefile b/www/resin3/Makefile index 14e3bc1fd78f..de26fa86d6d9 100644 --- a/www/resin3/Makefile +++ b/www/resin3/Makefile @@ -7,6 +7,7 @@ PORTNAME= resin PORTVERSION= 3.1.12 +PORTREVISION= 1 CATEGORIES= www java MASTER_SITES= http://www.caucho.com/download/ @@ -44,7 +45,7 @@ LOG_FILE?= ${APP_HOME}/${APP_NAME}.log # Other settings APXS?= ${LOCALBASE}/sbin/apxs SUB_FILES= pkg-message resin3ctl -USE_RC_SUBR= resin3.sh +USE_RC_SUBR= resin3 .include diff --git a/www/resin3/files/resin3.in b/www/resin3/files/resin3.in new file mode 100644 index 000000000000..bececbd5ff52 --- /dev/null +++ b/www/resin3/files/resin3.in @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/www/resin3/files/resin3.in,v 1.1 2012-04-02 23:51:25 jgh Exp $ +# + +# PROVIDE: %%APP_NAME%% +# REQUIRE: LOGIN NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable %%APP_NAME%%: +# +# %%APP_NAME%%_enable="YES" +# + + +%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"} +%%APP_NAME%%_user=${%%APP_NAME%%_user:"www"} +%%APP_NAME%%_group=${%%APP_NAME%%_group:"www"} + +. /etc/rc.subr + +name=%%APP_NAME%% +rcvar=%%APP_NAME%%_enable + +load_rc_config ${name} + +command="%%PREFIX%%/sbin/%%APP_NAME%%ctl" +command_args="start" +pidfile=%%PID_FILE%% + +if test -n "${%%APP_NAME%%_java_version}" ; then + JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) + procname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) +else + JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) + procname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) +fi + +export JAVA_HOME + +run_rc_command "$1" diff --git a/www/resin3/files/resin3.sh.in b/www/resin3/files/resin3.sh.in deleted file mode 100644 index fe04d7d11fa0..000000000000 --- a/www/resin3/files/resin3.sh.in +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/www/resin3/files/Attic/resin3.sh.in,v 1.1 2012-03-13 16:29:23 jgh Exp $ -# - -# PROVIDE: %%APP_NAME%% -# REQUIRE: LOGIN -# KEYWORD: shutdown - -# -# Add the following line to /etc/rc.conf to enable %%APP_NAME%%: -# -# %%APP_NAME%%_enable="YES" -# - -. /etc/rc.subr - -name=%%APP_NAME%% -rcvar=%%APP_NAME%%_enable - -command="%%PREFIX%%/sbin/%%APP_NAME%%ctl" -command_args="start" -pidfile=%%PID_FILE%% - -# set defaults - -%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"} -%%APP_NAME%%_user=${%%APP_NAME%%_user:-"%%USERS%%"} -%%APP_NAME%%_group=${%%APP_NAME%%_group:-"%%GROUPS%%"} - -load_rc_config ${name} - -if test -n "${%%APP_NAME%%_java_version}" ; then - JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) - procname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) -else - JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) - procname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) -fi - -export JAVA_HOME - -run_rc_command "$1" -- cgit