Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Mar 2007 07:09:13 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Setting Env
Message-ID:  <45F02719.2060604@u.washington.edu>
In-Reply-To: <263543.26969.qm@web62205.mail.re1.yahoo.com>
References:  <263543.26969.qm@web62205.mail.re1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Drew Jenkins wrote:
> 20I wrote the following script (with your help) to solve the problem I'm having with setting the MySQL environment and getting Zope up after the fact. I have saved this in /usr/local/etc/rc.d/ If I run this after the machine reboots, all is well. If I simply let it run in the reboot sequence, it doesn't do it's job! The sleep command is to give the server a chance to finish all its other bootup sequences, since that appears to be the factor messing things up. But it doesn't work!! What can I do to tweak this to do what I need it to do?
> TIA,
> Drew
> 
> #!/bin/sh
> 
> sleep 60
> if [ -n "$LD_LIBRARY_PATH" ] ; then
>     export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql"
> else
>     export LD_LIBRARY_PATH="/usr/local/lib/mysql"
> fi
> 
> cd /usr/local/zope/
> ./instance1/bin/zopectl stop
> ./instance1/bin/zopectl start
> ./instance2/bin/zopectl stop
> ./instance2/bin/zopectl start

Well, it's going to involve a bit more than that to get an rc script up 
and running I'm afraid.. the script needs a start, stop, status 
functions, as well as a few others. Some examples are in the /etc/rc.d 
and /usr/local/etc/rc.d directories, as you've discovered.

Given your output above, maybe you want to add the LD_LIBRARY_PATH lines 
to the zopectl file?

Cheers!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45F02719.2060604>