McGregor80
Posts: 40
Joined: Wed Feb 20, 2013 10:35 am

autostart and run controll

Sun Jun 16, 2013 3:18 pm

Hi i wrote simple c application which uses i2c and uart.
Now i would like to have it starting every time the raspberry Pi (raspbian) starts.
1. Where to add the path to the binary so it will be starting automatically? How to solve the login problem (you have to login before right?)

2. Is there any way to have a automatic check which restarts the application if it's not running? I guess some kind of command in cron which checks if there is any process with the application name and if not than restarting it. Important would be to not start it if it's running. (I'm amateur programmer so it wouldn't surprise me if it would just crash :)

3. What rights i should give to the application to be able to run it without being Sudo? I know there is possibility to create my own group. I tried that and i also tried changing all the rights for the binary with chmod 777 TheProgram but still i have to use sudo. I guess i do something wrong.

Thanks for any help

Return to “Beginners”