Friday, March 23, 2018

autostart - How can I configure a service to run at startup



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?



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


No comments:

Post a Comment