"Fossies" - the Fresh Open Source Software Archive

Member "Plone-5.2.5-UnifiedInstaller-1.0/init_scripts/RedHat-FedoraCore/plone-cluster-user" (13 Sep 2021, 1604 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 user="plone_daemon"
   37 
   38 start() {
   39     echo -n $"Starting $prog zeo server: "
   40     daemon --user=$user ${clusterpath}/bin/plonectl start
   41     return $?
   42 }
   43 
   44 stop() {
   45     echo -n $"Stopping $prog zeo server: "
   46     daemon --user=$user ${clusterpath}/bin/plonectl stop
   47     return $?
   48 }
   49 
   50 status() {
   51     echo "ZEO Server:"
   52     ${clusterpath}/bin/plonectl status
   53     return $?
   54 }
   55 
   56 restart() {
   57    stop
   58    start
   59 }
   60 
   61 case "$1" in
   62   start)
   63     start
   64     ;;
   65   stop)
   66     stop
   67     ;;
   68   status)
   69     status
   70     ;;
   71   restart)
   72     restart
   73     ;;
   74   condrestart)
   75     [ -e /var/lock/subsys/$prog ] && restart
   76     ;;
   77   *)
   78     echo $"Usage: $0 {start|stop|status|restart|condrestart}"
   79     RETVAL=2
   80 esac
   81 
   82 exit $RETVAL