aboutsummaryrefslogtreecommitdiffstats
path: root/www/cherokee/files
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-03-21 05:51:35 +0800
committerpav <pav@FreeBSD.org>2006-03-21 05:51:35 +0800
commit914b0a8da75c2252e556d25d9fe52eefa6a7361c (patch)
treecf5a08ff4781ae4a0a612d18a98f0a38cb567650 /www/cherokee/files
parenta69126390a9dd68ddc689864e38a41f7fd137a84 (diff)
downloadfreebsd-ports-gnome-914b0a8da75c2252e556d25d9fe52eefa6a7361c.tar.gz
freebsd-ports-gnome-914b0a8da75c2252e556d25d9fe52eefa6a7361c.tar.zst
freebsd-ports-gnome-914b0a8da75c2252e556d25d9fe52eefa6a7361c.zip
- Add rc script
PR: ports/94724 Submitted by: chinsan <chinsan.tw@gmail.com>
Diffstat (limited to 'www/cherokee/files')
-rw-r--r--www/cherokee/files/cherokee.sh.in45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/cherokee/files/cherokee.sh.in b/www/cherokee/files/cherokee.sh.in
new file mode 100644
index 000000000000..f35381e205da
--- /dev/null
+++ b/www/cherokee/files/cherokee.sh.in
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: cherokee
+# REQUIRE: %%REQUIRE%%
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable cherokee:
+#
+# cherokee_enable (bool): Set it to "YES" to enable cherokee
+# Default is "NO".
+# cherokee_conf (path): Set full path to config file.
+# Default is "%%PREFIX%%/etc/cherokee.conf".
+#
+
+. %%RC_SUBR%%
+
+name="cherokee"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${cherokee_enable="NO"}
+: ${cherokee_conf="%%PREFIX%%/etc/cherokee/cherokee.conf"}
+
+command=%%PREFIX%%/sbin/cherokee
+command_args="-C ${cherokee_conf} -b"
+pidfile=/var/run/cherokee.pid
+required_files=${cherokee_conf}
+stop_postcmd=stop_postcmd
+restart_precmd="checkconfig"
+
+checkconfig()
+{
+ echo "Performing sanity check on ${name} configuration:"
+ eval "${command} ${command_args} -t"
+}
+
+stop_postcmd()
+{
+ rm -f ${pidfile}
+}
+
+run_rc_command "$1"