initctl won't start jobs

11,031

(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.

Share:
11,031

Related videos on Youtube

michael s
Author by

michael s

Updated on September 18, 2022

Comments

  • michael s
    michael s over 1 year

    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.

    • Jorge Castro
      Jorge Castro over 12 years
      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.
    • Admin
      Admin about 10 years
      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!