I have a script called mgrst
that restarts mongrel for me:
cd /opt/redmine
/usr/local/bin/mongrel_rails cluster::stop
rm -rf tmp/pids/*
/usr/local/bin/mongrel_rails cluster::start
I am calling this with a line in rc.local
:
/usr/bin/mgrst >>/tmp/start.log 2>&1
start.log has this in it after startup:
already stopped port 3000
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: command not found: mongrel_rails start -d -e production -c /opt/redmine --user apache --group apache -p 3000 -P tmp/pids/mongrel.3000.pid -l log/mongrel.3000.log
starting port 3000
Mongrel is not started after startup. I can switch to root and run the mgrst
command above and it works fine. From the error above it appears it's not finding the mongrel command at startup even though I give it a full path. Any idea what's going on here?