[Zodb-checkins] CVS: StandaloneZODB/ZEO/misc - README:1.2.2.1 custom_zodb.py:1.2.2.1 start_zeo:1.2.2.1 stop_zeo:1.2.2.1

Jeremy Hylton jeremy@zope.com
Fri, 11 Jan 2002 15:24:48 -0500


Update of /cvs-repository/StandaloneZODB/ZEO/misc
In directory cvs.zope.org:/tmp/cvs-serv10280

Added Files:
      Tag: Standby-branch
	README custom_zodb.py start_zeo stop_zeo 
Log Message:
Merge ZEO-ZRPC-Dev branch into Standby-branch.



=== Added File StandaloneZODB/ZEO/misc/README ===
This directory contains some sampe scripts for starting/stopping ZEO, etc.
Please feel free to submit improvements. :)


=== Added File StandaloneZODB/ZEO/misc/custom_zodb.py ===
# Sample custom_zodb.py
__version__ = "$Revision: 1.2.2.1 $"[11:-2]

# In situations where we switch between different storages, we've
# found it useful to use if-elif-else pattern.
import os

if 0: # Change the 0 to 1 to enable!
    
    # ZEO Unix Domain Socket

    # This import isn't strictly necessary but is helpful when
    # debugging and while Zope's and Python's asyncore are out of sync
    # to make sure we get the right version of asyncore.
    import ZServer

    import ZEO.ClientStorage
    Storage=ZEO.ClientStorage.ClientStorage(
        os.path.join(INSTANCE_HOME, 'var', 'zeo.soc'),
        # If no name is given, then connection info will be shown:
        name="ZEO Storage",
        # You can specify the storage name, which defaults to "1":
        storage="1",
        )

else:

    # Default FileStorage
    import ZODB.FileStorage
    Storage=ZODB.FileStorage.FileStorage(
        os.path.join(INSTANCE_HOME, 'var', 'Data.fs'),
        )



=== Added File StandaloneZODB/ZEO/misc/start_zeo ===
#!/bin/sh
reldir=`dirname $0`
exec python $reldir/lib/python/ZEO/start.py \
  -U $reldir/var/zeo.soc \
  ZEO_SERVER_PID=$reldir/var/ZEO_SERVER.pid \
  STUPID_LOG_FILE=$reldir/var/ZEO_EVENTS.log \
  "$@" 



=== Added File StandaloneZODB/ZEO/misc/stop_zeo ===
#!/bin/sh
reldir=`dirname $0`
kill `cat $reldir/var/ZEO_SERVER.pid`