aboutsummaryrefslogtreecommitdiff
path: root/www/p5-Starman
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2011-05-05 20:51:53 +0000
committerSteve Wills <swills@FreeBSD.org>2011-05-05 20:51:53 +0000
commit431046bc8506cd3ec23844f6b7031740f9cf13f4 (patch)
treeaf6ec2b4c6860617eeb7440c863f20fe3981f1ef /www/p5-Starman
parent4fddb1cda28a920fefea722081e380253658909b (diff)
downloadports-431046bc8506cd3ec23844f6b7031740f9cf13f4.tar.gz
ports-431046bc8506cd3ec23844f6b7031740f9cf13f4.zip
Notes
Diffstat (limited to 'www/p5-Starman')
-rw-r--r--www/p5-Starman/Makefile2
-rw-r--r--www/p5-Starman/files/starman.in43
2 files changed, 45 insertions, 0 deletions
diff --git a/www/p5-Starman/Makefile b/www/p5-Starman/Makefile
index a70ad0d05609..42618b6b79cd 100644
--- a/www/p5-Starman/Makefile
+++ b/www/p5-Starman/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Starman
PORTVERSION= 0.2010
+PORTREVISION= 1
CATEGORIES= www perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:MIYAGAWA
@@ -24,6 +25,7 @@ RUN_DEPENDS= \
BUILD_DEPENDS= ${RUN_DEPENDS}
PERL_CONFIGURE= yes
+USE_RC_SUBR= starman
MAN1= starman.1
MAN3= Plack::Handler::Starman.3 \
diff --git a/www/p5-Starman/files/starman.in b/www/p5-Starman/files/starman.in
new file mode 100644
index 000000000000..a1381fe74df0
--- /dev/null
+++ b/www/p5-Starman/files/starman.in
@@ -0,0 +1,43 @@
+#!/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_config=${starman_config-"%%PREFIX%%/etc/starman.psgi"}
+starman_user=${starman_user-"www"}
+starman_group=${starman_group-"www"}
+
+pidfile=${starman_pidfile:-/var/run/starman/starman.pid}
+command_args="--daemonize --user ${starman_user} --group ${starman_group} --pid ${pidfile} --app ${starman_config}"
+required_files="${starman_config}"
+extra_commands="reload"
+
+run_rc_command "$1"