From: "Javier H." Date: 2011-05-08T10:13:35+09:00 Subject: Re: How to do that god started when the server starts [CentOS] 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/.