aboutsummaryrefslogtreecommitdiff
path: root/www/rubygem-mongrel_cluster/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-09-25 09:10:42 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-09-25 09:10:42 +0000
commitc1082d67f33474f09c8ccd2dc51db47c5c3787e6 (patch)
tree07140758463d069e77b1977b16634aa208d555d5 /www/rubygem-mongrel_cluster/files
parent5c4bfd8722c372f23deeb678af18d29a1b2652f0 (diff)
downloadports-c1082d67f33474f09c8ccd2dc51db47c5c3787e6.tar.gz
ports-c1082d67f33474f09c8ccd2dc51db47c5c3787e6.zip
Notes
Diffstat (limited to 'www/rubygem-mongrel_cluster/files')
-rw-r--r--www/rubygem-mongrel_cluster/files/mongrel_cluster.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/www/rubygem-mongrel_cluster/files/mongrel_cluster.in b/www/rubygem-mongrel_cluster/files/mongrel_cluster.in
new file mode 100644
index 000000000000..53fd903c5c2f
--- /dev/null
+++ b/www/rubygem-mongrel_cluster/files/mongrel_cluster.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+# PROVIDE: mongrel_cluster
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# This script is modified by placing the following variables inside
+# /etc/rc.conf.local, /etc/rc.conf, or /etc/rc.conf.d/mongrel_cluster:
+#
+# mongrel_cluster_enable (bool):
+# Set it to YES to enable this service.
+# Default: NO
+# mongrel_cluster_conf_dir (path):
+# The directory containing the configuration file (*.yml) for each
+# application you want to control.
+# Default: %%PREFIX%%/etc/mongrel_cluster
+
+. %%RC_SUBR%%
+
+name=mongrel_cluster
+rcvar=${name}_enable
+
+command="%%PREFIX%%/bin/mongrel_cluster_ctl"
+required_dirs="%%PREFIX%%/etc/${name}"
+
+load_rc_config $name
+
+: ${mongrel_cluster_enable="NO"}
+: ${mongrel_cluster_conf_dir="%%PREFIX%%/etc/mongrel_cluster"}
+
+command_args="-c ${mongrel_cluster_conf_dir}"
+start_cmd="${command} start ${command_args}"
+stop_cmd="${command} stop ${command_args}"
+restart_cmd="${command} restart ${command_args}"
+
+run_rc_command "$1"