Does anybody have an init script that will work with Zope.2.0.1.src? I'm a Linux starter and for the light of my heart I can't get Zope to start automatically. -- Adrian Esteban Madrid Network Support, ATS Brigham Young University
At 14:22 Uhr -0700 12.11.1999, Adrian Esteban Madrid wrote:
Does anybody have an init script that will work with Zope.2.0.1.src? I'm a Linux starter and for the light of my heart I can't get Zope to start automatically.
Hi, I have the same problem. Although the "start" script is there and works all right, it is by no mean a way for the Sys V Init... Did you get a solution to your problem, yet? Anyone else out there who could help us??? Jochen
On Mon, 15 Nov 1999, Jochen Haeberle wrote:
Anyone else out there who could help us???
Jochen
This is the one I use which was posted on the list some time ago, by ... oh boy I forgot. #!/bin/sh # # description: Runs Zope # chkconfig: 345 80 45 # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting Zope: " touch /var/lock/subsys/zope daemon /usr/local/bin/start_zope echo ;; stop) echo -n "Shutting down Zope: " /usr/local/Zope/stop rm -f /var/lock/subsys/zope echo ;; status) status zope ;; restart) $0 stop $0 start ;; *) echo "Usage: zope {start|stop|status|restart}" exit 1 esac exit 0 and start_zope is basically: #! /bin/sh PYTHONHOME=/usr/local/Zopec export PYTHONHOME exec /usr/local/bin/python \ /usr/local/Zope/z2.py \ -a <ip add> \ -d <ip add> \ -u nobody \ -w 8080 \ -f 8021 \ -m 8033 \ -l /usr/local/Zope/var/ZServer.log Pavlos
Hi Pavlos, thanks for sending your script! It seems to me that you have a script etc/rc.d/init.d/functions (path from whereever your zope script is located) that carris such interesting functions like deamon or status... at least my system does not offer those commands. What system are you using this on? Linux? What distribution? From your script, the start script and z2.py I learned that it is the line starting with "-D" that prevents Zope from forking. If you issue a python z2.py -h you get the help text and it tells you that -D starts Zope in a debug-mode preventing it from forking from the terminal. If you delete the -D line in the start script and the trailing "\" in the line before, you can use start from your scripts. Just issuing start will use the built in config-values. You can overwrite them like shown in the mail from Pavlos (copied below) in the start_zope script. Again, python z2.py -h tells you more about the options. Regards Jochen At 17:20 Uhr -0500 15.11.1999, Pavlos Christoforou wrote:
On Mon, 15 Nov 1999, Jochen Haeberle wrote:
Anyone else out there who could help us???
Jochen
This is the one I use which was posted on the list some time ago, by ... oh boy I forgot.
#!/bin/sh # # description: Runs Zope # chkconfig: 345 80 45 # Source function library. . /etc/rc.d/init.d/functions
# See how we were called. case "$1" in start) echo -n "Starting Zope: " touch /var/lock/subsys/zope daemon /usr/local/bin/start_zope echo
;; stop) echo -n "Shutting down Zope: " /usr/local/Zope/stop rm -f /var/lock/subsys/zope echo ;; status) status zope ;; restart) $0 stop $0 start ;; *) echo "Usage: zope {start|stop|status|restart}" exit 1 esac
exit 0
and start_zope is basically: #! /bin/sh PYTHONHOME=/usr/local/Zopec export PYTHONHOME exec /usr/local/bin/python \ /usr/local/Zope/z2.py \ -a <ip add> \ -d <ip add> \ -u nobody \ -w 8080 \ -f 8021 \ -m 8033 \ -l /usr/local/Zope/var/ZServer.log
Pavlos
On Tue, 16 Nov 1999, Jochen Haeberle wrote:
It seems to me that you have a script etc/rc.d/init.d/functions (path from whereever your zope script is located) that carris such interesting functions like deamon or status... at least my system does not offer those commands.
What system are you using this on? Linux? What distribution?
I am running Linux 6.0 but these functions were available from earlier distributions (5.2). Nevertheless you don't really need the deamon function as z2.py takes care of that. Just run it without the -D option so it will detach from the controlling terminal. I generally prefer to leave z2.py unmodified and create starting scripts, for different configurations, Zope versions etc. Pavlos
participants (3)
-
Adrian Esteban Madrid -
Jochen Haeberle -
Pavlos Christoforou