Upstart is a ridiculously easy way to turn your scripts into daemons. Take this python script:
/home/myuser/ez_daemon.py
:
And that’s it!
<ul>
<li>exec python /home/myuser/ez_daemon.py
sudo start ez_daemon
</li>
<li>sudo tail -f /var/log/upstart/ez_daemon.log
</li>
<li>sudo stop ez_daemon
</li>
</ul>
You can do this for any program, and it’s how Ubuntu and Fedora start most daemons.
Here’s a more complete example:
Each line is called a stanza, and they are documented in the Upstart cookbook.
It’s clear, it’s easy, and it works. And that makes me happy.