[Zope-Coders] Re: runzope - but no stopzope in Zope 2.7?
Tres Seaver
tseaver at zope.com
Wed Nov 19 16:45:49 EST 2003
On Wed, 2003-11-19 at 16:00, Christian Heimes wrote:
> Andreas Jung wrote:
> > Just because several people noticed that there is no stop script. Maybe
> > a flaw in the docs
> > (if there are some :-))
>
> killzope:
> ---------------------------------------
> #! /bin/sh
>
> INSTANCE_HOME="/var/lib/zope/plone"
> PID_FILE="${INSTANCE_HOME}/var/Z2.pid"
>
> kill `cat $PID_FILE`
Not recommended for Zope 2.7; either use 'runzope' to run in the
foreground (in which case Ctrl-C is all you need), or use the controller
script, 'zopectl'. E.g.::
$ bin/runzope
....
2003-11-19T16:39:29 INFO(0) Zope Ready to handle requests
^C
$ bin/zopectl start
daemon process started, pid=4973
$ bin/zopectl logtail
------
2003-11-19T16:40:05 INFO(0) ZServer HTTP server started at Wed Nov 19
16:40:05 2003
Hostname: localhost.localdomain
Port: 8080
------
2003-11-19T16:40:05 INFO(0) ZServer FTP server started at Wed Nov 19
16:40:05 2003
Hostname: secretariat.zope.com
Port: 8021
------
2003-11-19T16:40:05 INFO(0) Zope Ready to handle requests
^C
$ bin/zopectl stop
daemon process stopped
The 'zopectl' script is designed to be easily integrated into system
startup utilities (e.g., Redhat 9's init.d / chkconfig), where having a
single script with 'start', 'stop', 'restart', etc. is important.
For even more fun, try using zopectl in standalone mode::
$ bin/zopectl
program: /home/tseaver/projects/Zope-CVS/Zope-2.7-branch/bin/runzope
daemon manager not running
zopectl> help
Documented commands (type help <topic>):
========================================
EOF fg kill quit run start wait
adduser foreground logreopen reload shell status
debug help logtail restart show stop
zopectl> help reload
reload [options] -- Reload the configuration.
Without options, this reparses the command line.
With options, this substitutes 'options' for the
command line, except that if no -C option is given,
the last configuration file is used.
zopectl> help debug
debug -- run the Zope debugger to inspect your database
manually using a Python interactive shell
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-Coders
mailing list