diff options
author | pav <pav@FreeBSD.org> | 2006-01-05 23:39:09 +0000 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-01-05 23:39:09 +0000 |
commit | d3c31e94068a23574e034a485cd930823289708a (patch) | |
tree | 1ee4eb61859e17f31d7bb6ada33ea1c4eaf6e261 /www/zope213/files/zeo28.sh.in | |
parent | a9a1494d3660220be8764a9f89714620ce023a9d (diff) | |
download | FreeBSD-ports-d3c31e94068a23574e034a485cd930823289708a.zip FreeBSD-ports-d3c31e94068a23574e034a485cd930823289708a.tar.gz |
- Update to 2.8.5
PR: ports/91365
Submitted by: Denis Shaposhnikov <dsh@vlink.ru> (maintainer)
Diffstat (limited to 'www/zope213/files/zeo28.sh.in')
-rw-r--r-- | www/zope213/files/zeo28.sh.in | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/www/zope213/files/zeo28.sh.in b/www/zope213/files/zeo28.sh.in index bc44e87..3d1e71a 100644 --- a/www/zope213/files/zeo28.sh.in +++ b/www/zope213/files/zeo28.sh.in @@ -1,53 +1,66 @@ #!/bin/sh - -# Start or stop zope +# +# Startup script for Zeo server. +# # $FreeBSD$ +# # PROVIDE: zeo28 # REQUIRE: DAEMON # BEFORE: zope28 -# KEYWORD: FreeBSD shutdown -# -prefix=%%PREFIX%% -# Define these zope28_* variables in one of these files: +# Define these zeo28_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/zeo28 # -# DO NOT CHANGE THESE DEFAULT VALUES HERE +# zeo28_enable : bool +# Enable Zeo ("YES") or not ("NO", the default). +# +# zeo28_instances : list +# List of dirs with Zeo's instances ("" by default). # -zeo28_enable=${zeo28_enable:-"NO"} # Enable zeo server -zeo28_instances=${zeo28_instances:-""} # List of instancehome dirs . %%RC_SUBR%% name="zeo28" rcvar=`set_rcvar` + +zeo28ctl () { + for instance in $zeo28_instances; do + if [ -d ${instance} ]; then + echo -n " Zeo instance ${instance} -> " + ${instance}/bin/zeoctl "$1" + fi + done +} + +zeo28_start () { + echo "Starting Zeo 2.8:" + zeo28ctl "start" +} + +zeo28_stop () { + echo "Stopping Zeo 2.8:" + zeo28ctl "stop" +} + +zeo28_restart () { + echo "Restarting Zeo 2.8:" + zeo28ctl "restart" +} + + start_cmd="zeo28_start" + stop_cmd="zeo28_stop" +restart_cmd="zeo28_restart" + load_rc_config $name -if checkyesno zeo28_enable; then - - case "$1" in - start) - echo "Starting Zeo 2.8" - ;; - stop) - echo "Stopping Zeo 2.8" - ;; - restart) - echo "Restarting Zeo 2.8" - ;; - *) - echo "Unknown action \"$1\"" - ;; - esac - - for instance in $zeo28_instances - do - if [ -r ${instance}/etc/zeo.conf -a -x ${instance}/bin/zeoctl ]; then - echo -n " Instance ${instance} -> " - ${instance}/bin/zeoctl $1 - fi - done -fi +: ${zeo28_enable="NO"} +: ${zeo28_instances=""} + +cmd="$1" +[ $# -gt 0 ] && shift +[ -n "$*" ] && zeo28_instances="$*" + +run_rc_command "${cmd}" |