Services Autostart – How to Configure a Service to Run at Startup

autostartservices

I have a daemon that runs fine if I start it manually with the service command:

ricardo@ricardo-laptop:~$ sudo service minidlna start                   
 * Starting minidlna minidlna                                                              [ OK ] 

but it's not configured to auto start when the PC reboots.

How can I configure it to start automatically, even if no one is logged into the PC?

Best Answer

sudo update-rc.d minidlna defaults

This should add the service to the automatic startup system. But if you get:

System start/stop links for /etc/init.d/minidlna already exist.

Do the command

sudo update-rc.d minidlna enable

P.S.: For further detail look at the man page for update-rc.d by typing the command man update-rc.d

Related Question