[zopeorg-checkins] CVS: NZO_SiteLayout - buildout_zope_sandbox:1.1

Sidnei da Silva sidnei at x3ng.com.br
Thu May 8 17:16:15 EDT 2003


Update of /cvs-zopeorg/NZO_SiteLayout
In directory cvs.zope.org:/tmp/cvs-serv9620

Added Files:
	buildout_zope_sandbox 
Log Message:
Removing old cruft and replacing by a cleaner approach, based on Tres OSCOM script

=== Added File NZO_SiteLayout/buildout_zope_sandbox === (436/536 lines abridged)
#!/bin/sh
#==============================================================================
#   OSCOM 2003: Zope CMS Interoperability Workshop
#
#   Build out a working Zope sandbox from sources.
#
#   - Python and PyXML build from tarballs, because SourceForge won't
#     do :pserver: CVS reliably.
#
#   - Zope, CMF, and other products build from CVS checkouts.
#
#   Usage:
#
#    Run this script from within an empty "sandbox" directory.
#
#      $ mkdir /tmp/OSCOM
#      $ cd /tmp/OSCOM
#      $ /tmp/build_sandbox
#
#   Theory of Operation
#
#     This script creates all the software needed to start a Zope application
#     server (with the corresponding ZEO storage server);  in particular,
#     it *builds its own Python*, to avoid clashing with the system version,
#     and to ease installation of packages which Zope depends on.
#
#     It creates the following top-level directories:
#
#     'src' -- "pristine" sources (from tarballs / CVS checkouts), in
#              "version-qualified" directories
#
#     'opt' -- "built" sources (compilation artifacts go here) are in
#              "version-qualified" directories.  The versions in actual
#               use are symlinked to "standard" names (e.g., 'opt/Python2'
#               is symlinked to 'opt/Python-2.1.3').
#
#     'bin' -- executables are linked here from the 'opt' tree.
#
#     'etc' -- configuration files for the appserver / storage server.
#
#     'var' -- log, data, and pid files for running servers.  The Zope
#              INSTANCE_HOME is in 'var/zope'.
#
#     'tmp' -- fetch directory for tarballs.
#
#   $Id: buildout_zope_sandbox,v 1.1 2003/05/08 21:16:15 sidnei Exp $
#==============================================================================
PLATFORM=`uname`
echo Building OSCOM Zope sandbox: PLATFORM is $PLATFORM


[-=- -=- -=- 436 lines omitted -=- -=- -=-]


start_zope () {
    echo Starting Zope application server
    echo \$python \$zope_start -X -w \$www_port "\$@"
    \$python \$zope_start -X -w \$www_port "\$@"
}

stop_zope () {
    echo Stopping Zope application server
    pid=\`cat \$pidfile\`
    echo kill "\$@" \$pid
    kill "\$@" \$pid
}

case "\$1" in

start)
    start_zope
    ;;

stop)
    stop_zope
    ;;

restart)
   stop_zope
   start_zope
   ;;

*)
    echo "zopectl [ start | stop | restart ]"

esac
ZOPECTL_EOF
    chmod +x $bindir/zopectl

else  # Zope 2.7+

    ln -s $vardir/storage/bin/zeoctl .
    ln -s $vardir/zope/bin/zopectl .

fi

#------------------------------------------------------------------------------
#   Start the storage and the appserver
#------------------------------------------------------------------------------
cd $sandbox

$bindir/zeoctl start
$bindir/zopectl start





More information about the zopeorg-checkins mailing list