Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Controlling Ubuntu's and Fedora's Upstart (the init replacement)

May 13, 2009, 22:33 (0 Talkback[s])
(Other stories by Juliet Kemp)

"But what about setting up a particular job for yourself? You keep your job definitions in /etc/init/jobs.d, and they should be plain text files, and not executable. Your job needs to have either an exec line:

exec /bin/echo "ping"

"giving a path to a binary, and the arguments to pass to it; or a script section, as in the runlevel 3 job description above, which has a shell script to be run with /bin/sh. These define what will be run when the job is triggered. Jobs can be set to respawn with the line:

respawn

"There's an automatic limit set to this: if a process is respawned more than 10 times within 5 seconds, it will be stopped and not restarted. You can alter this default with:

respawn limit 20 5"

Complete Story

Related Stories: