[Zope] Starting and Stopping Multiple Zope Instances HOWTO

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Tue, 08 Feb 2000 15:57:10 +0100


:-) Just when I wanted to wrote a small how-to on this, somebody releases
an .rc script. Anyhow, I also wrote an .rc script and this one should also
work (It's tested on Mandrake 7.0 and everything works well, even
linuxconf). I've named this .rc script -> zope.rc and placed it in
/etc/rc.d/init.d and then used SysV Init Editor to make the correct links
to the rc?.d

Here is the script: (let me know if I did something wrong)

Of course I assume that Zope is installed in directory : /usr/local/zope

#! /bin/sh
#
# Startup script for Zope
#
# chkconfig: 345 87 17
# description: Zope is the leading Open Source web application server. \
#              Zope enables teams to collaborate in the creation and \
#              management of dynamic web-based business applications \
#              such as intranets and portals.
#
# processname: zope
# pidfile: /usr/local/zope/var/Z2.pid
# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
        exit 0
fi

# See how we were called.
case "$1" in
  start)
        echo -n "Starting Zope2 service: "
        /usr/local/zope/start '/usr/local/zope/var/zProcess.pid'
        touch /var/lock/subsys/zope
        ;;
  stop)
        echo -n "Stopping Zope2 service: "
        /usr/local/zope/stop
        rm -f /var/lock/subsys/zope
        rm -f /usr/local/zope/var/Z2.pid
        ;;
  restart|reload)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: zope {start|stop|restart|reload}"
        exit 1
esac

exit 0


Regards, Tom.

At 15:25 05/02/2000 -0500, Chris McDonough wrote:
>Wow.  Nice job!
>
>Jim Cain wrote:
>> 
>> All,
>> 
>> I previously posted the scripts and configuration files I used to start
>> and stop Zope. Now I have packaged those up into a HOWTO at Zope.org:
>> 
>> http://www.zope.org/Members/jec/startstop_howto_html
>> 
>> Cheers,
>> Jim
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists -
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>-- 
>Chris McDonough
>Digital Creations, Inc.
>Zope - http://www.zope.org
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>