startup / shutdown script (rc.d)

Jerry McAllister jerrymc at msu.edu
Tue Jun 5 14:50:00 UTC 2007


On Mon, Jun 04, 2007 at 10:52:43PM -0700, gmoniey wrote:

> 
> thanks for the ideas, i tried both of your suggestions...i manually ran the
> rails.sh file, and everything worked as expected...so i dumped the output to
> file...my .sh file looks as such:
> 
> #!/bin/sh
> case "$1" in
> start)
>         echo "RAILS found start" >> /tmp/test.file
>         kldload accf_http >> /tmp/test.file
>         mongrel_rails cluster::start -v -C
> /usr/local/www/app/config/mongrel_cluster.yml >> /tmp/test.file
>         /usr/local/www/app/script/backgroundrb start
>         ;;
> stop)
>         echo "RAILS found stop" >> /tmp/test.file
>         mongrel_rails cluster::stop -v -C
> /usr/local/www/app/config/mongrel_cluster.yml >> /tmp/test.file
>         /usr/local/www/app/script/backgroundrb stop
>         ;;
> *)
>         echo "Usage: `basename $0` {start|stop}" >&2
>         exit 64
>         ;;
> esac
> 
> 
> and the test.file ended up with this after the reboot:
> 
> $cat /tmp/test.file
> RAILS found start
> 
> 
> the weird part is that the Rails found stop never printed...and im not sure
> why the mongrel_rails fails (im assuming that the kldload works fine as it
> doesn't print out any error messages if it is successfull)

Well, it looks like something after the case-start echo did not
work and things just died there and nothing else ran.
I would also put an echo just before the start and the stop sections
of the rc.d script end eg, just before the ';;'  in each..

What is the '/usr/local/www/app/config/mongrel_cluster.yml >> /tmp/test.file'
supposed to accomplish?

////jerry

> 
> i guess i will just keep playing with it...
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/startup---shutdown-script-%28rc.d%29-tf3848895.html#a10963533
> Sent from the freebsd-questions mailing list archive at Nabble.com.
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list