ports/155304: [PATCH] www/p5-Starman: USE_RC_SUBR

Tomoyuki Sakurai tomoyukis at reallyenglish.com
Sun Mar 6 09:20:17 UTC 2011


>Number:         155304
>Category:       ports
>Synopsis:       [PATCH] www/p5-Starman: USE_RC_SUBR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 06 09:20:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Tomoyuki Sakurai
>Release:        FreeBSD 8.2-PRERELEASE amd64
>Organization:
reallyenglish
>Environment:
System: FreeBSD smer.jp.reallyenglish.com 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #4: Tue Jan 25 14:39:42 JST 2011
>Description:
Add rc.subr(8) script

Added file(s):
- files/starman.sh.in

Port maintainer (kuriyama at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- p5-Starman-0.2007.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/p5-Starman/Makefile /usr/home/tomoyukis/git/reallyenglish-ports/www/p5-Starman/Makefile
--- /usr/ports/www/p5-Starman/Makefile	2010-10-10 14:53:19.000000000 +0900
+++ /usr/home/tomoyukis/git/reallyenglish-ports/www/p5-Starman/Makefile	2011-03-06 17:35:11.000000000 +0900
@@ -24,6 +24,7 @@
 BUILD_DEPENDS=	${RUN_DEPENDS}
 
 PERL_CONFIGURE=	yes
+USE_RC_SUBR=	starman.sh
 
 MAN1=	starman.1
 MAN3=	Plack::Handler::Starman.3 \
diff -ruN --exclude=CVS /usr/ports/www/p5-Starman/files/starman.sh.in /usr/home/tomoyukis/git/reallyenglish-ports/www/p5-Starman/files/starman.sh.in
--- /usr/ports/www/p5-Starman/files/starman.sh.in	1970-01-01 09:00:00.000000000 +0900
+++ /usr/home/tomoyukis/git/reallyenglish-ports/www/p5-Starman/files/starman.sh.in	2011-03-06 17:34:15.000000000 +0900
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# $FreeBSD:$
+# PROVIDE: starman
+# REQUIRE: NETWORKING 
+# KEYWORD:  shutdown
+
+# starman_enable (bool): Set to "NO" by default.
+#
+# starman_flags (str):  Optional flags to starman
+#   Default is ""
+#   example: starman_flags="--workers 5 --port 3000"
+#
+# starman_config (str): ".psgi" script to run
+#   Default is "%%PREFIX%%/etc/starman.psgi"
+#
+# starman_user (str):   Setuid to group
+#   Default is "www"
+#
+# starman_group (str):  Setgid to group
+#   Default is "www"
+#
+# starman_pidfile (str):    PID file
+#   Default is "/var/run/starman/starman.pid""
+
+. /etc/rc.subr
+
+name=starman
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/${name}"
+load_rc_config $name
+
+starman_enable=${starman_enable-"NO"}
+starman_pidfile=${starman_pidfile-"/var/run/starman/starman.pid"}
+starman_config=${starman_config-"%%PREFIX%%/etc/starman.psgi"}
+starman_user=${starman_user-"www"}
+starman_group=${starman_group-"www"}
+starman_flags=${starman_flags-""}
+
+pidfile="${starman_pidfile}"
+command_args="--daemonize --user ${starman_user} --group ${starman_group} --pid ${starman_pidfile} --app ${starman_config}"
+required_files="${starman_config} ${starman_config}"
+extra_commands="reload"
+
+run_rc_command "$1"
--- p5-Starman-0.2007.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list