<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; border-collapse: collapse; ">Hi,<br><p>I run the resque init script using /etc/init.d/resque start at the command line which works perfectly fine while the machine is up and <br>
running fine, The issue is it doesnot come up automatically after bootup. <br><br></p><p>root@hoststage:~# cat /etc/init.d/resque </p><div><span style="font-size: 13px; ">#!/bin/bash<br># Author Kaushal Shriyan<br># Date 31/05/2010<br>
# Startup script for Resque Server<br><br>touch /root/status<br>set -e<br><br>start_resque=/usr/local/AddressBook/EntAddressBookDataStore/current/resque_cluster_start.sh<br>stop_resque=/usr/local/AddressBook/EntAddressBookDataStore/current/resque_cluster_stop.sh<br>
<br>start() {<br> echo -n "Starting ResqueServer: "<br> ${start_resque} <br> echo "starting" >> /root/status<br> uptime >> /root/status<br> echo "done."<br>
exit 0<br>}<br>stop() {<br> echo -n "Shutting down ResqueServer: "<br> ${stop_resque} <br> echo "done."<br> exit 0<br>}<br><br># See how we were called<br>case "$1" in<br>
start)<br> start<br> ;;<br> stop)<br> stop<br> ;;<br> restart)<br> stop<br> sleep 10<br> start<br> ;;<br> *)<br> echo "Usage: $0 {start|stop|restart}"<br>
esac<br></span><div>root@hoststage:~# cat /usr/local/AddressBook/EntAddressBookDataStore/ </div></div><div style="color: rgb(80, 0, 80); "><br>current/resque_cluster_start.sh <br></div>#!/bin/bash <br><p></p><p>cd /usr/local/AddressBook/EntAddressBookDataStore/current/ <br>
RAILS_ENV=production ./resque_start.sh > log/resque.1.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.2.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.3.log 2>&1 & <br>
RAILS_ENV=production ./resque_start.sh > log/resque.4.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.5.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.6.log 2>&1 & <br>
RAILS_ENV=production ./resque_start.sh > log/resque.7.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.8.log 2>&1 & <br>RAILS_ENV=production ./resque_start.sh > log/resque.9.log 2>&1 & <br>
RAILS_ENV=production ./resque_start.sh > log/resque.10.log 2>&1 & <br>root@hoststage:~# ls -l /usr/local/AddressBook/EntAddressBookDataStore/ </p><div style="color: rgb(80, 0, 80); "><br>current/resque_cluster_start.sh <br>
</div>-rwxr-xr-x 1 root root 724 2010-05-31 04:50 /usr/local/AddressBook/ <div style="color: rgb(80, 0, 80); "><br>EntAddressBookDataStore/current/resque_cluster_start.sh <br></div><p></p><p>#cat resque_start.sh <br>#!/usr/bin/env sh <br>
</p><p># === GC settings ============= <br># twitter's settings <br># TODO - set only for the forked process not the parent process <br># export RUBY_HEAP_MIN_SLOTS=500000 <br># export RUBY_HEAP_SLOTS_INCREMENT=250000 <br>
# export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 <br># export RUBY_GC_MALLOC_LIMIT=50000000 <br># ============================ <br></p><p># required to start the redis server: <br># redis-server <path to redis.conf> <br></p>
<p># VVERBOSE=true level of verbosity - useful for debugging <br># QUEUE=<value> the named queue to be polled <br># INTERVAL=<seconds> the interval to sleep if there is no job in the <br>queue <br></p><p># INTERVAL=60 <br>
QUEUE=contact_import /usr/bin/env rake -f /usr/local/AddressBook/ <br>EntAddressBookDataStore/current/Rakefile resque:work #--trace <br></p><p># start the redis-web app <br>#resque-web -p8282 config/initializers/load_resque.rb <br>
</p><p># if [ -f "/usr/local/redis/redis.conf" ]; then <br># /usr/local/redis/redis.conf/redis-server /usr/local/redis/ <br>redis.conf <br># else <br># /usr/local/redis/redis.conf/redis-server /usr/local/redis/ <br>
redis.conf <br># fi <br></p><p>root@hoststage:/etc/rc2.d# <br>lrwxrwxrwx 1 root root 23 2010-05-27 06:06 S20nvidia-kernel -> ../ <br>init.d/nvidia-kernel <br>lrwxrwxrwx 1 root root 16 2010-05-31 05:19 S20resque -> ../init.d/ <br>
resque <br>lrwxrwxrwx 1 root root 20 2010-05-31 05:19 S20resque_web -> ../init.d/ <br>resque_web <br>root@hoststage:/etc/rc3.d# ls -l <br>total 4 <br>lrwxrwxrwx 1 root root 16 2010-05-31 05:19 S20resque -> ../init.d/ <br>
resque <br>lrwxrwxrwx 1 root root 20 2010-05-31 05:19 S20resque_web -> ../init.d/ <br>resque_web <br>root@hoststage:/etc/rc3.d# <br>total 4 <br>lrwxrwxrwx 1 root root 16 2010-05-31 05:19 S20resque -> ../init.d/ <br>
resque <br>lrwxrwxrwx 1 root root 20 2010-05-31 05:19 S20resque_web -> ../init.d/ <br>resque_web <br>root@hoststage:/etc/rc2.d# <br>total 4 <br>lrwxrwxrwx 1 root root 16 2010-05-31 05:19 S20resque -> ../init.d/ <br>
resque <br>lrwxrwxrwx 1 root root 20 2010-05-31 05:19 S20resque_web -> ../init.d/ <br>resque_web <br>root@hoststage:/etc/rc4.d# <br>total 4 <br>lrwxrwxrwx 1 root root 16 2010-05-31 05:19 S20resque -> ../init.d/ <br>
resque <br>lrwxrwxrwx 1 root root 20 2010-05-31 05:19 S20resque_web -> ../init.d/ <br>resque_web <br>root@hoststage:/etc/rc5.d# <br></p><p>Please suggest further. <br></p><p>Thanks and Regards </p><p>Kaushal</p></span>