Well I wrote the shell script and that works, so I will call that from crontab every few minutes. If anyone is interested I have attached a copy of it.
Mike D **************************************** Educational Directories Unlimited, Inc. Michael Dittbrenner Programmer http://www.StudyAbroad.com http://www.GradSchools.com A service of EDU, Inc... http://www.EDUdirectories.com A partner of EDU Internet Strategies: http://www.EDUInternetStrategies.com/ [Phone] 610-499-9200 [Fax] 610-499-9205 [E-mail] [EMAIL PROTECTED] or [EMAIL PROTECTED] -----Original Message----- From: John McGowan [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 9:41 AM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: server quit - restart The solution that I implemented on Linux should work on OSX... No need to use cron though. the solution i used is called "procautostart" I downloaded the source and compiled it. Since OSX is a flavor of Unix now, you should be able to do the same. Check out this link, it explaines how the procautostart process works. http://www.linuxdocs.org/HOWTOs/Process-Monitor-HOWTO-2.html Once you get procautostart compiled and running on the simple test that they provide, you can do something like this to your start witango script. #!/bin/bash # Set up environment umask 022 WITANGO_USER=witango ; export WITANGO_USER WITANGO_PATH=/usr/local/witango ; export WITANGO_PATH WITANGO_CONFIG=$WITANGO_PATH/configuration ; export WITANGO_CONFIG JAVA_HOME=/usr/local/j2re1.4.1_03 ; export JAVA_HOME PATH=$WITANGO_PATH/bin:/bin:/usr/bin ; export PATH LD_LIBRARY_PATH=$WITANGO_PATH:$JAVA_HOME/lib/i386/server:$JAVA_HOME/lib/i386 /client:$JAVA_HOME/lib/i386:/usr/lib ; export LD_LIBRARY_PATH CLASSPATH=$WITANGO_PATH/jdbc_drivers/JSQLConnect.jar:$WITANGO_PATH ; export CLASSPATH LC_ALL=en_US ; export LC_ALL cd /usr/local/witango /sbin/procautostart -n 5 -c "$WITANGO_PATH/witangod -u" nohup & /John Michael Dittbrenner wrote: > I was wondering if anyone has and is willing to share code to have the > witangod process restarted after it unexpectedly quits. We just > upgraded to witango 5 for mac and the server seems to quit out, I was > in the process of trying to write a shell script to be called by > crontab to see if the process is running if not to start it. If > someone has anything like this and is willing to share I would greatly > appreciate it. > > > > Mike D > > > > **************************************** > > Educational Directories Unlimited, Inc. > > > > Michael Dittbrenner > > Programmer > > http://www.StudyAbroad.com <http://www.studyabroad.com/> > > http://www.GradSchools.com <http://www.gradschools.com/> > > A service of EDU, Inc... http://www.EDUdirectories.com > <http://www.edudirectories.com/> > > A partner of EDU Internet Strategies: > http://www.EDUInternetStrategies.com/ > <http://www.eduinternetstrategies.com/> > > > > [Phone] 610-499-9200 > > [Fax] 610-499-9205 > > [E-mail] [EMAIL PROTECTED] or [EMAIL PROTECTED] > > > >________________________________________________________________________ >TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
test.sh
Description: Binary data
