aboutsummaryrefslogtreecommitdiff
path: root/www/zope213/files/zope210.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'www/zope213/files/zope210.sh.in')
-rw-r--r--www/zope213/files/zope210.sh.in65
1 files changed, 65 insertions, 0 deletions
diff --git a/www/zope213/files/zope210.sh.in b/www/zope213/files/zope210.sh.in
new file mode 100644
index 000000000000..daba77525c7e
--- /dev/null
+++ b/www/zope213/files/zope210.sh.in
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# Startup script for Zope server.
+#
+# $FreeBSD$
+#
+
+# PROVIDE: zope210
+# REQUIRE: DAEMON
+
+# Define these zope210_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/zope210
+#
+# zope210_enable : bool
+# Enable Zope ("YES") or not ("NO", the default).
+#
+# zope210_instances : list
+# List of dirs with Zope's instances ("" by default).
+#
+
+. %%RC_SUBR%%
+
+name="zope210"
+rcvar=`set_rcvar`
+
+zope210ctl () {
+ for instance in $zope210_instances; do
+ if [ -d ${instance} ]; then
+ echo -n " Zope instance ${instance} -> "
+ ${instance}/bin/zopectl "$1"
+ fi
+ done
+}
+
+zope210_start () {
+ echo "Starting Zope 2.10:"
+ zope210ctl "start"
+}
+
+zope210_stop () {
+ echo "Stopping Zope 2.10:"
+ zope210ctl "stop"
+}
+
+zope210_restart () {
+ echo "Restarting Zope 2.10:"
+ zope210ctl "restart"
+}
+
+ start_cmd="zope210_start"
+ stop_cmd="zope210_stop"
+restart_cmd="zope210_restart"
+
+load_rc_config $name
+
+: ${zope210_enable="NO"}
+: ${zope210_instances=""}
+
+cmd="$1"
+[ $# -gt 0 ] && shift
+[ -n "$*" ] && zope210_instances="$*"
+
+run_rc_command "${cmd}"