[Zope] I'm stuck getting Zope to start on boot RH7

Paul Zwarts paz@oratrix.com
Wed, 11 Jul 2001 15:39:11 +0200


Since Redhat 7, the init.d functionality has changed.
You must now use chkconfig to not only create symlinks in the staged rc.#
directories, but you need the inclusion of a function file.

What happens is the you must create a script in /etc/rc.d/init.d/zope2 that
has an intelligent method of querying a script such as start. This script
must be able to understand the following:

/etc/rc.d/init.d/zope2 start

/etc/rc.d/init.d/zope2 stop

/etc/rc.d/init.d/zope2 restart

/etc/rc.d/init.d/zope2 status

You cannot take start now and place it in init.d. In Redhat 7+ I suggest you
check the atd script for an example.


Here is a script I modified for zope, that works, but not entirely:

#!/bin/bash
#
#	/etc/rc.d/init.d/zope2
#
# Starts the Zope daemon
#

# chkconfig: 345 85 85
# description: Zope server.

. /etc/init.d/functions

RETVAL=0

#
#	See how we were called.
#

prog="Zope2"

start() {
	# Check if atd is already running
	    echo -n $"Starting $prog: "
	    /var/Zope-233b/start
	    RETVAL=$?
	    [ $RETVAL -eq 0 ]
	    echo
	return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	/var/Zope-233b/stop
	RETVAL=$?
	[ $RETVAL -eq 0 ]
	echo
        return $RETVAL
}


restart() {
	stop
	start
}

reload() {
	restart
}

status_at() {
 	status /var/Zope-233b/start
}

case "$1" in
start)
	start
	;;
stop)
	stop
	;;
reload|restart)
	restart
	;;
condrestart)
	if [ -f /var/lock/subsys/atd ]; then
	    restart
	fi
	;;
status)
	status_at
	;;
*)
	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
	exit 1
esac

exit $?
exit $RETVAL




Hope this helps,
Paz




-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Carl
David
Sent: Wednesday, July 11, 2001 3:24 PM
To: zope@zope.org
Subject: [Zope] I'm stuck getting Zope to start on boot RH7


subject really says it all. From the command line, in /etc/init.d/ I can
execute a script called zope which starts Zope properly (I can see it
with ps -ef).
Using Control Panel, I've placed zope in the start and stop places
properly, and upon boot, there is a message that Zope has been started
(OK), but ps -ef tells me that this is not so, i.e., it's been stopped
somehow.
Can someone suggest things I should do?
I got this going on RH6, on a sparc machine, but this is a i386 machine
and a slightly higher level of RH.
Thanks
Carl David
david@uconnvm.uconn.edu


_______________________________________________
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 )