I've got a small project that's based around a raspberry pi. A central part of this project is for my program to be executed on start-up and run until shutdown, all while running stand-alone (that means no SSH). One way I've found is to run my program with
nohup, but this still requires an ssh session to start.
I've written the program following the guidelines for creating a linux daemon, yet when I execute it as
sudo ./myprogram, it doesn't actually seem to be running as root (it can't to write to the GPIO pins). What is the proper way of going about this?