Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #4094
| From | "Javier H." <devcindario@gmail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: How to do that god started when the server starts [CentOS] |
| Date | 2011-05-07 20:13 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <2dd0bcb2135eba6c62c4868cd92dacb3@ruby-forum.com> (permalink) |
| References | <d1065d74e923cf4089e41f31cfe0db94@ruby-forum.com> |
Ok, sorry.
Thanks for your answer.
I had seen the script. Use another similar, but none has worked.
###########################################
#!/bin/bash
#
# God
#
# chkconfig: 2345 85 15
# description: start, stop, restart God
#
# Also consider adding this line (kills god weekly) to your crontab
(sudo crontab -e):
#
# # deicide is painless
# 0 1 * * 0 god quit; sleep 1; killall god; sleep 1; killall -9 god;
sleep 1; /etc/init.d/god start
#
. /etc/rc.d/init.d/functions
RETVAL=0
prog="god"
CONF="/etc/god.conf"
PID_FILE="/var/run/god/god.pid" ; mkdir -p `dirname $PID_FILE`
LOG_FILE="/var/log/god/god.log" ; mkdir -p `dirname $LOG_FILE`
GOD="/usr/local/rvm/gems/ruby-1.8.7-p334/gems/god-0.11.0/bin/god"
start()
{
echo -n $"Starting $prog: "
$GOD -c "$CONF" -P "$PID_FILE" -l "$LOG_FILE" && success || failure
RETVAL=$?
echo
}
stop()
{
echo -n $"Stopping $prog: "
kill `cat $PID_FILE` && success || failure
RETVAL=$?
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status -p $PID_FILE $prog
RETVAL=$?
;;
*)
echo "Usage: $prog {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
################################
/etc/init.d/god start
Start god: /usr/bin/env: ruby: Not exist file
[FAIL]
################################
god.pid not exist in my server.
find / -name god.pid
Result is nothing.
it's necessary?
################################
I installed God with 'gem install god', how say here
http://god.rubyforge.org/
gem -v >> 1.6.2
ruby -v >> ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
rvm -v >> rvm 1.6.5 by Wayne E. Seguin (wayneeseguin@gmail.com)
[https://rvm.beginrescueend.com/]
rails -v >> Rails 3.0.7
god -v >> Version 0.11.0
################################
How i can solved these matters of 'god.pid' and '/usr/bin/env: ruby:'?
Best regards
-javier
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Find similar | Unroll thread
How to do that god started when the server starts [CentOS] "Javier H." <devcindario@gmail.com> - 2011-05-07 16:12 -0500 Re: How to do that god started when the server starts [CentOS] Steve Klabnik <steve@steveklabnik.com> - 2011-05-07 16:26 -0500 Re: How to do that god started when the server starts [CentOS] "Javier H." <devcindario@gmail.com> - 2011-05-07 20:13 -0500
csiph-web