Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I deployed my project on a Shared Hosting that has Root access the Server in picture is CENTOS

now although I have defined the service to start on boot it not getting started

chkconfig --level 35 thin.startup on

chkconfig --list | grep 'thin'
thin.startup    0:off   1:off   2:off   3:on    4:off   5:on    6:off

Here the script look like the script is stored under /etc/init.d/thin.startup

#!/bin/sh
#
#
# network Bring thin server up
#
# chkconfig: 35 20 80
# description: Starts and stops the thin Server and 
#
# 
# See how we were called.

thin -C /home/perwe100/public_html/1001/fedena-v2.3-bundle-linux/config/fedena.yml start

Not sure what is going wrong since I can find anything in boot.log and chkservd.log

am I missing something

Btw I can see the symlink present in /etc/rc3.d/ and /etc/rc5.d/ S20thin.startup@

Any one has an idea what I'm doing wrong

I want the script to start server on REBOOT

share|improve this question

2 Answers 2

A couple of things you might need to check -

1 - you enabled thin for run levels 35, make sure your server is running in either run level 3 or 5. If not you might need to enable it for additional run levels. Although a CentOS server is most likely to run in run level 3 or 5, just double check it. runlevel

2 - Specify the full path to the thin binary.

something like this -

DAEMON=/fullpathhere-to-binary-here/bin/thin

$DAEMON -C /yml-path-here/.yml start

3 - Before adding it to a start up script, confirm that the script works fine from the command line -

  thin -C /home/perwe100/public_html/1001/fedena-v2.3-bundle-linux/config/fedena.yml start
share|improve this answer

Init scripts are a bit more complex than your script. Check out here: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/

If you didn't want to write a complex init script than you can put your stuff into /etc/rc.d/rc.local see: http://www.centos.org/docs/5/html/5.1/Installation_Guide/s1-boot-init-shutdown-run-boot.html

share|improve this answer
    
Good to know this but I cant see it working either not working added the script /usr/local/bin/thin -C /home/perwe100/public_html/1001/fedena-v2.3-bundle-linux/config/fedena.yml start when added in /etc/rc.d/rc.local any other solution my friend –  Viren Feb 1 '13 at 13:51
    
Try /etc/rc.local –  Stone Feb 1 '13 at 14:07
    
/etc/rc.local -> rc.d/rc.local* symlink already added as mention above –  Viren Feb 1 '13 at 14:09
    
You should have the simplink /etc/rc?.d/S99local to ../rc.local on your desired runlevel. It is not by default. See the answer at: serverfault.com/questions/475568/… –  Stone Feb 5 '13 at 11:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.