im looking for solution, how to edit some files to specify which bash file (it's called startupScript.sh) should start after booting the device. I'm using bash version, without GUI. But the script should read a keyboard input, after booting up.
I have attempted to modify /.bashrc
and even /etc/rc.local
, but it didn't work for me. Also driverboot.service... I'm seeking a solution for my script to start a FastAPI server (using uvicorn). In the file named startupScript.sh, there is the code sudo uvicorn main:app
, and this should initiate my server even after a reboot.
~/.bashrc
method may be OK except it gets called whenever a new shell gets started. For a GUI way you need to open an lxterminal and set the command running in there. I'd do that from the GUI autostart file.