How to install an init.d script in ubuntu?

Posted by suhail on Ask Ubuntu See other posts from Ask Ubuntu or by suhail
Published on 2013-08-21T06:48:19Z Indexed on 2013/10/28 4:04 UTC
Read the original article Hit count: 365

Filed under:
|
|
|
|

i am trying to install an init.d script, to run celery for scheduling tasks. Here is the steps i followed:

  • copied the file celeryd and pasted it in folder /etc/init.d/
  • created a configuration file celeryd in folder /etc/default/

now when i tried to start it by sudo /etc/init.d/celeryd start, it throws error sudo: /etc/init.d/celeryd: command not found

I googled about how to install init.d, i got this SO-question.

it says to issue a uname -a and when i does i get this:

Linux capsonesystem8-desktop 3.2.0-43-generic-pae 
#68-Ubuntu SMP Wed May 15 03:55:10 UTC     
2013 i686 i686 i386 GNU/Linux

and also it says use utils like insserv to enable init.d script so tried:

insserv /etc/init.d/celeryd but it throws error insserv: command not found

so i tried to install insserv sudo apt-get install insserv. but it say aleady installed:

insserv is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 222 not upgraded.

So how to install init.d script?? Any help will be appreciated.

update1:

when i tried:

$ sh -x /etc/init.d/celeryd start

it reveal some errors. may be that is why the service won’t start.

update2:

I cleared all the errors when i run $ sh -x /etc/init.d/celeryd start but still sudo /etc/init.d/celeryd start throws command not found error

© Ask Ubuntu or respective owner

Related posts about boot

Related posts about scripts