"Fossies" - the Fresh Open Source Software Archive

Member "Plone-5.2.5-UnifiedInstaller-1.0/init_scripts/RedHat-FedoraCore/plone-cluster" (13 Sep 2021, 1544 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 # /etc/rc.d/init.d/zeocluster
    3 # Startup script for Zope with ZEOCluster
    4 #
    5 # This script works on Red Hat / Fedora Core style Linuxes
    6 #
    7 # chkconfig: 345 80 20
    8 # description: Zope, a web application server
    9 # this works as is for a default universal plone linux install
   10 #
   11 # Typical installation:
   12 # sudo cp plone-cluster /etc/rc.d/init.d/plone
   13 # sudo chmod 755 /etc/rc.d/init.d/plone
   14 # sudo /sbin/chkconfig --add plone
   15 #
   16 # Typical removal:
   17 # sudo /sbin/chkconfig --del plone
   18 #
   19 # config: /opt/plone/zeocluster/buildout.cfg
   20 
   21 # Source function library.
   22 if [ -f /etc/init.d/functions ] ; then
   23         . /etc/init.d/functions
   24 elif [ -f /etc/rc.d/init.d/functions ] ; then
   25         . /etc/rc.d/init.d/functions
   26 else
   27         exit 0
   28 fi
   29 
   30 RETVAL=0
   31 # list zeo clients in the list below
   32 zeoclients="client1 client2"
   33 # this is for the default install path for Plone-3.0-buildout
   34 clusterpath="/opt/plone/zeocluster"
   35 prog="plone"
   36 
   37 start() {
   38     echo -n $"Starting $prog zeo server: "
   39     ${clusterpath}/bin/plonectl start
   40     return $?
   41 }
   42 
   43 stop() {
   44     echo -n $"Stopping $prog zeo server: "
   45     ${clusterpath}/bin/plonectl stop
   46     return $?
   47 }
   48 
   49 status() {
   50     echo "ZEO Server:"
   51     ${clusterpath}/bin/plonectl status
   52     return $?
   53 }
   54 
   55 restart() {
   56    stop
   57    start
   58 }
   59 
   60 case "$1" in
   61   start)
   62     start
   63     ;;
   64   stop)
   65     stop
   66     ;;
   67   status)
   68     status
   69     ;;
   70   restart)
   71     restart
   72     ;;
   73   condrestart)
   74     [ -e /var/lock/subsys/$prog ] && restart
   75     ;;
   76   *)
   77     echo $"Usage: $0 {start|stop|status|restart|condrestart}"
   78     RETVAL=2
   79 esac
   80 
   81 exit $RETVAL