Tuesday, March 6, 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

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...