aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2011-05-06 04:51:53 +0800
committerswills <swills@FreeBSD.org>2011-05-06 04:51:53 +0800
commit0920e5c269ea694db3ffef12e7690293e575a40a (patch)
treed88a255857872bbf3544363ffd3ae5b52a8d31bc /www
parenta360209b6aea03a7645f46ac45484323b78f7b8c (diff)
downloadfreebsd-ports-gnome-0920e5c269ea694db3ffef12e7690293e575a40a.tar.gz
freebsd-ports-gnome-0920e5c269ea694db3ffef12e7690293e575a40a.tar.zst
freebsd-ports-gnome-0920e5c269ea694db3ffef12e7690293e575a40a.zip
- Add rc.subr script
PR: ports/155304 Submitted by: Tomoyuki Sakurai <tomoyukis@reallyenglish.com> Approved by: maintainer timeout (kuriyama)
Diffstat (limited to 'www')
-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"