Megaleecher.Net

Making technology work for you...

Get Your Free Subscription By Email:

Launching Scripts and Applications on Raspberry Pi Boot

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.

init.d folder

Steps to create autostart services in Debian :

  1. Use sudo nano /etc/init.d/aria2cRPC to create an startup script with name "aria2cRPC".
  2. You can use the skleton file provided in /etc/init.d folder as an template to get your application running as service on boot.

  3. 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.
  4. Simply edit the service name, the application path and arguments as per your needs and everything else should be fine.
  5. Once edited, make sure you make the file executable by using sudo chmod +x /etc/init.d/aria2cRPC command.
  6. Once executable use sudo update-rc.d aria2cRPC defaults to make our script launch at start.

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.