[Zope] Whats the best way to Automatically Start Zope Server on bootup??

Jules zope@jules.com
Sat, 29 Jan 2000 18:51:56 -0500


| Whats the best way to Automatically Start Zope Server on bootup??
| 
| I have SuSE 6.2 system.  I am having some trouble (newbie, sorry)
| deciding what the best way to start it up automatically.  Docs say
| boot.local, but it stops the process.
|
| Do I run it as daemon?  If so how?  In background??  Not sure.

Yes, you do run it as a daemon and need to do a few tweaks to your system.

First, login as root. cd to /sbin/init.d/ and copy 'skeleton' to, say,
'zope' or whatever you want to call the script file.

Edit the zope file with your favorite text editor. Change all instances of
'START_FOO' to 'START_ZOPE'. Then in the start) and stop) sections,
uncomment (remove the "#" on that line) the startproc and killproc lines.
Depending on how you've got your system setup, you'll need to figure out
what goes here. If you're running ZServer so you'll want to put the path to
Zope's start and stop scripts where skeleton has /sbin/foo.

In the reload) section, uncomment the "$0 stop  &&  $0 start  ||
return=$rc_failed" line.

The status) section is the same as you've done to start) and stop). I don't
think probe) applies here so leave it as it is.

Save this file and exit the editor. Test it by calling /sbin/init.d/zope
start, /sbin/init.d/zope stop and /sbin/init.d/zope status.

Once that's working, the next step is to create a symbolic link from the
zope file you've created to one of the runlevel directories. I'd put mine in
rc2.d as that's a logical place to start services such as Zope.

cd to /sbin/init.d/rc2.d/ and type

    ln -s ../zope S22zope

and then

    ln -s ../zope K22zope

These files will be called when your system stops and starts providing an
environment variable has been defined.

So, the final step is to define that variable. cd to /etc and edit
rc.config. Make a backup if you're new to manually tweaking this file as if
you mess it up, your system may not boot!

Scroll down and somewhere just after all the START_* entries, put

    #
    # Start Zope Daemon? (yes/no)
    #
    START_ZOPE=yes

If you want to disable Zope when your system starts or stops, you can now
use yast to toggle the Yes or No entry.

If you upgrade SuSE to another release, be sure to keep a copy of the zope
shell file and /etc/rc.config. I don't think the move from 6.2 -> 6.3 messes
anything up but you never know. If yast replaces the files, you'll need to
edit them again. Probably the worst case is yast might strip out your edits
to rc.config but this is unlikely.

Good luck!

Cheers,
Jules