mugetsu
mugetsu

Reputation: 4398

starting C executable in raspbian on startup

I'm using raspbian on a raspberry pi and I need to start a program on startup. What is the easiest way to do this? A bash script?

normally I run the following code in terminal:

../simple/./simple_run 12345

the executable has an input for 12345

Can someone step me through on how to do this?

Upvotes: 1

Views: 1840

Answers (1)

Joao Polo
Joao Polo

Reputation: 2163

Could you call your script at /etc/rc.local

If this file doesn't exist, create this:

#!/bin/sh -e
#

/.../myScript.sh

replace /.../myScript.sh by your script call... use full path.

Only one question... your script will be executed with "root" user... take care!

Upvotes: 2

Related Questions