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