"Fossies" - the Fresh Open Source Software Archive

Member "Plone-5.2.5-UnifiedInstaller-1.0/init_scripts/FreeBSD/zeo2_10" (13 Sep 2021, 1270 Bytes) of package /linux/www/Plone-5.2.5-UnifiedInstaller-1.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #
    3 # Startup script for Zeo server component of Plone.
    4 #
    5 # Based on:
    6 # $FreeBSD: ports/www/zope29/files/zeo29.sh.in,v 1.1 2006/01/28 10:07:29 pav Exp $
    7 #
    8 
    9 # PROVIDE: zeo2_10
   10 # REQUIRE: DAEMON
   11 # BEFORE: zope2_10
   12 
   13 # Define these zeo2_10_* variables in one of these files:
   14 #       /etc/rc.conf
   15 #       /etc/rc.conf.local
   16 #       /etc/rc.conf.d/zeo2_10
   17 #
   18 # zeo2_10_enable : bool
   19 #   Enable Zeo ("YES") or not ("NO", the default).
   20 #
   21 # zeo2_10_instances : list
   22 #   List of dirs with Zeo's instances ("" by default).
   23 #
   24 
   25 . /etc/rc.subr
   26 
   27 name="zeo2_10"
   28 rcvar=`set_rcvar`
   29 
   30 zeo2_10ctl () {
   31     for instance in $zeo2_10_instances; do
   32         if [ -d ${instance} ]; then
   33             echo -n "  Zeo instance ${instance} -> "
   34             ${instance}/bin/plonectl "$1"
   35         fi
   36     done
   37 }
   38 
   39 zeo2_10_start () {
   40     echo "Starting Zeo 2.10:"
   41     zeo2_10ctl "start"
   42 }
   43 
   44 zeo2_10_stop () {
   45     echo "Stopping Zeo 2.10:"
   46     zeo2_10ctl "stop"
   47 }
   48 
   49 zeo2_10_restart () {
   50     echo "Restarting Zeo 2.10:"
   51     zeo2_10ctl "restart"
   52 }
   53 
   54   start_cmd="zeo2_10_start"
   55    stop_cmd="zeo2_10_stop"
   56 restart_cmd="zeo2_10_restart"
   57 
   58 load_rc_config $name
   59 
   60 : ${zeo2_10_enable="NO"}
   61 : ${zeo2_10_instances=""}
   62 
   63 cmd="$1"
   64 [ $# -gt 0 ] && shift
   65 [ -n  "$*" ] && zeo2_10_instances="$*"
   66 
   67 run_rc_command "${cmd}"
   68