I have a C++ that I would like to auto start each time the Pi boots. The make file takes the .cc file, transforms it into an .o file which it then transforms into an executable file without an extension.
Raspbian Buster Lite: Linux raspberrypi 4.19.58-v7l+ #1245 SMP Fri Jul 12 17:31:45 BST 2019 armv7l GNU/Linux
I am running that program with: sudo ./exec_file I need to run the program as root. The program does not have a GUI. I am running it from terminal.
-rwxr-xr-x 1 root root 1248576 Aug 24 17:09 /var/www/html/4panel/exec_file -rwxr-xr-x 1 root root 471 Aug 24 18:00 /etc/rc.local
I would like to know what do I need to write inside rc.local to make it "auto run". I have found examples with python programs, but I haven't found any with executable files or c++ programs. I only know that I have to specify the absolute path, but I have no idea what comes before that.
sudo /var/www/html/4panel/exec_file & inside rc.local before exit 0 did not work.
@sudo /var/www/html/4panel/exec_file &
Thank you !