#!/bin/sh # Start or stop zope # $FreeBSD: /tmp/pcvs/ports/www/zope31/files/Attic/zope31.sh.in,v 1.1 2005-10-18 11:23:35 garga Exp $ # PROVIDE: zope31 # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: FreeBSD shutdown # # Define these zope31_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/zope31 # # DO NOT CHANGE THESE DEFAULT VALUES HERE # zope31_enable=${zope31_enable:-"NO"} # Enable zope zope31_instances=${zope31_instances:-""} # List of instancehome dirs . %%RC_SUBR%% name="zope31" rcvar=`set_rcvar` load_rc_config $name zopectl () { for instance in $zope31_instances; do if [ -d ${instance} ]; then echo -n " Zope instance ${instance} -> " ${instance}/bin/zopectl "$1" fi done } zope_start () { echo "Starting Zope 3.1:" zopectl "start" } zope_stop () { echo "Stopping Zope 3.1:" zopectl "stop" } zope_restart () { echo "Restarting Zope 3.1:" zopectl "restart" } start_cmd="zope_start" stop_cmd="zope_stop" restart_cmd="zope_restart" cmd="$1" [ $# -gt 0 ] && shift [ -n "$*" ] && zope31_instances="$*" run_rc_command "${cmd}"