I would like to start aria2 as a daemon on startup on Raspberry Pi headless server (no GUI, just SSH access)
I created a service aria2cRPC that starts the application (got help from: http://www.megaleecher.net/Raspberry_Pi_Autostart) It starts the app like this:
sudo aria2c --daemon --enable-rpc --rpc-listen-all
When I start the service from SSH console
sudo service aria2cRPC start
Everythink works as expected.
But when I add the service to autostart on boot, it won't start.
sudo update-rc.d aria2cRPC defaults
Should I change the runlevel? Which level should I use? How can I test that the service is at least trying to start on boot?
EDIT: When I look into /etc/rcX.d I can see my service at:
/etc/rc0.d K01aria2cRPC /etc/rc1.d K01aria2cRPC /etc/rc2.d S01aria2cRPC /etc/rc3.d S01aria2cRPC /etc/rc4.d S01aria2cRPC /etc/rc5.d S01aria2cRPC /etc/rc6.d K01aria2cRPC
Does it mean that the service should be running when booted without X (run level 2,3,4)?