Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Custom Ubuntu Daemon

What's the "correct" way to create a custom daemon in Ubuntu, that will start at boot time and be controllable by Ubuntu's standard daemon start/stop commands?

Can I just copy and paste one of the scripts in /etc/init.d or do I need to "register" the daemon somewhere else?

like image 475
Cerin Avatar asked Jun 16 '10 18:06

Cerin


1 Answers

Since you asked about Ubuntu specifically, you should know that sysv-style init scripts (the ones that live under /etc/init.d) are being phased out in favor of Upstart jobs, which IMHO are a lot easier to create and work with. Here are some links to get you started:

http://upstart.ubuntu.com/

http://en.wikipedia.org/wiki/Upstart

http://www.netsplit.com/category/tech/upstart/

http://manpages.ubuntu.com/manpages/lucid/man5/init.5.html

like image 115
ʇsәɹoɈ Avatar answered Oct 23 '22 07:10

ʇsәɹoɈ