[Zope] Starting Zope

Costagliola Giovanni jancos@technologist.com
Mon, 31 Jul 2000 16:27:39 +0200


Hello I'm the man who generate this jungly mailing....

Simply, I use thesescripts:

---/usr/local/scripts/zstart-------------------------------------
#!/bin/bash

$ZOPE_BASE/start -u $ZOPE_USER -w 80 1>/dev/null 2>&1 &
---------------------------------------------------------------
the previous is invoked by the next one:
---/etc/rc.d/init.d/zope---------------------------------------
#!/bin/bash
# zope
#
# chkconfig: 345 90 10
# description: Starts and stops the Zope instances
# processname: z2.py

# ZOPE ENVIRONMENT
export ZOPE_BASE=/Zope-2.2.0
export ZOPE_USER=zope

# Source function library.
.. /etc/rc.d/init.d/functions

# Get config.
.. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1

[ -x /usr/local/scripts/zstart ] || exit 1
[ -x /usr/local/scripts/zstop ] || exit 1

# See how we were called.
case "$1" in
	start)
		echo -n "Starting Zope instances: "
		if /usr/local/scripts/zstart; then
			success zope startup
		else
			failure zope startup
		fi
		echo
		;;

	stop)
		echo -n "Stopping Zope instances: "
		if /usr/local/scripts/zstop /etc/zope.conf; then
			success zope shutdown
		else
			failure zope shutdown
		fi
		echo
		;;

	status)
		status /Zope-2.2.0/bin/python 
		exit $?
		;;

	restart)
		$0 stop
		sleep 2
		$0 start
		;;

	*)
		echo "Usage: $0 {start|stop|status|restart}"
		exit 1
esac

exit 0
--------------------------------------------------------------------
which invokes also this one to stop all.
---/usr/local/scripts/zstop-------------------------------------------
#!/bin/bash

kill `/bin/cat "$ZOPE_BASE/var/Z2.pid"`
----------------------------------------------------------------------

Many thanks to jec who's the author of the original suite of scripts that a
mangled, stupidely, to realize which ones I shown to you here.

Thanx to all.


-- 

                      >////////<
                      / *  * /
                     /   <  /
__________oOOo______/______/_____oOOo________

    (°>     Giovanni Costagliola  (jancos)
    //\     email: jancos@technologist.com
    V_/_    voice:      +39 (0)347 1174139
_____________________________________________
              /      /
             /      /
            (      (    ______
             \      \  /     /#####*** *  *    *
              \      \/     /####*** *  *
               \           /###*** *  *    *
                \         /##*** *  *
                 \_______/#*** *  *    *