mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-19 03:52:17 +00:00
5ab6ad22df
PR: ports/106001 Submitted by: HAYASHI Yasushi <yasi@yasi.to> (maintainer) Repocopy by: marcus
66 lines
1.1 KiB
Bash
66 lines
1.1 KiB
Bash
#!/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}"
|