Users world-over are tweaking there way into Raspberry Pi making multitudes of things, like low energy consuming dedicated downloader, media center, Network Attached File-server (NAS), weather station, home-automation and robotics. To do all this tinkering, you will frequently need to make sure applications are launched when the Raspberry Pi is restarted.
Follow this simple tutorial to create services which will automatically launch at Debian boot. We will be using the Linux standard init.d method to launch our applications as services during various run-levels.
sudo nano /etc/init.d/aria2cRPCto create an startup script with name "aria2cRPC".
- You can use the skleton file provided in /etc/init.d folder as an template to get your application running as service on boot.
- The above skeleton contains a lot of features you wont be needing, here is an simpler example which auto-launches aria2 downloader daemon at every boot.
- Simply edit the service name, the application path and arguments as per your needs and everything else should be fine.
- Once edited, make sure you make the file executable by using
sudo chmod +x /etc/init.d/aria2cRPCcommand.
- Once executable use
sudo update-rc.d aria2cRPC defaultsto make our script launch at start.