Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
58
rated 0 times [  58] [ 0]  / answers: 1 / hits: 353271  / 2 Years ago, wed, march 16, 2022, 2:07:08

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


More From » startup

 Answers
4

Your celeryd script is probably not executable, that's why sudo /etc/init.d/celeryd is returning command not found. So, you need to first make it executable.



To do so, run the following commands:



sudo chmod 755 /etc/init.d/celeryd
sudo chown root:root /etc/init.d/celeryd


The first line changes the permissions to -rwxr-xr-x, and the second line ensures that the owner and group owner of the file is root.



Once this is done, I assume you will need to use sudo /etc/init.d/celeryd start to start the daemon.


[#29853] Wednesday, March 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
egantfis

Total Points: 406
Total Questions: 108
Total Answers: 108

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
;