How to do that god started when the server starts [CentOS]

J

Javier H.

Hello,

To start using:

god -c /etc/init.d/profile.god -D

What could do that when you start CentOS God be forfeited?

Best Regards
 
J

Javier H.

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 ([email protected])
[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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top