freebsd-ports/www/zope29/files/zope29.sh.in
Pav Lucistnik 7c2c2661e4 - Add Zope 2.9.0 after repocopy
PR:		ports/91824
Submitted by:	HAYASHI Yasushi <yasi@yasi.to>
Repocopy by:	marcus
2006-01-28 10:07:29 +00:00

65 lines
1.1 KiB
Bash

#!/bin/sh
#
# Startup script for Zope server.
#
# $FreeBSD$
#
# PROVIDE: zope29
# REQUIRE: DAEMON
# Define these zope29_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/zope29
#
# zope29_enable : bool
# Enable Zope ("YES") or not ("NO", the default).
#
# zope29_instances : list
# List of dirs with Zope's instances ("" by default).
#
. %%RC_SUBR%%
name="zope29"
rcvar=`set_rcvar`
zope29ctl () {
for instance in $zope29_instances; do
if [ -d ${instance} ]; then
echo -n " Zope instance ${instance} -> "
${instance}/bin/zopectl "$1"
fi
done
}
zope29_start () {
echo "Starting Zope 2.9:"
zope29ctl "start"
}
zope29_stop () {
echo "Stopping Zope 2.9:"
zope29ctl "stop"
}
zope29_restart () {
echo "Restarting Zope 2.9:"
zope29ctl "restart"
}
start_cmd="zope29_start"
stop_cmd="zope29_stop"
restart_cmd="zope29_restart"
load_rc_config $name
: ${zope29_enable="NO"}
: ${zope29_instances=""}
cmd="$1"
[ $# -gt 0 ] && shift
[ -n "$*" ] && zope29_instances="$*"
run_rc_command "${cmd}"