1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/www/zope3/files/zope3.sh.in
Pav Lucistnik 83dc61301a - Update to 3.2.0
- Rename to www/zope3

PR:		ports/91818
Submitted by:	Denis Shaposhnikov <dsh@vlink.ru> (maintainer)
2006-01-23 21:11:17 +00:00

66 lines
1.1 KiB
Bash

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