I am operating an Ubuntu 11.10 server and one of the PHP scripts calls a bash script for inserting jobs and starting them.

The script copies the job into /etc/init

Everything is fine except that the jobs don't get started with

sudo /sbin/initctl start my-tiny-job

(I think the reason is unknown job)

When I run the bash script by hand:

php-user$ ./bashscript.sh  

then it works! So this means the job file is correct.

Since this is a functionality called from a web interface I really need to know why this doesn't work.

  • Welcome to AU Michael, glad you got it solved, the way this site works is for you to post your solution as an answer and then click the accept button, this marks it as solved. I'll roll this back and then you can just copy and paste from the editing history. – Jorge Castro Dec 16 '11 at 15:30
  • I use Ubuntu 13.10 and I met same trouble. Please try initctl command in console. To enter console session, press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F1</kbd> and login. For me it succeeded this way! – user268442 Apr 13 '14 at 10:00

(Answered by OP)

Got it myself! when new jobs are inserted into /etc/init then the update is not noticed until the next check. Myscript is at lot faster then check frenquence so the update needs to be initiation ny hand:

sudo initctl reload-configuration

Now it works as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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