How to auto start a excute file when start up
Posted: 2025-03-27 4:31
Hi, I have compiled the example luckfox_pico_rtsp_yolov5_demo. I want it to auto-run when I boost up RV1106. I have followed the tutorial in the wiki, but it did not work.
Note: When I try run this /etc/init.d/S99yolov5 start on terminal to test my script it work fine. But when I reboot, script look like not run or error.
This is my step:
Create a script in /etc/init.d/S99yolov5
chmod +x S99yolov5
reboot
This is my code in script
Note: When I try run this /etc/init.d/S99yolov5 start on terminal to test my script it work fine. But when I reboot, script look like not run or error.
This is my step:
Create a script in /etc/init.d/S99yolov5
chmod +x S99yolov5
reboot
This is my code in script
Code: Select all
#!/bin/sh
case $1 in
start)
echo "Starting..."
cd /Projects
/oem/usr/bin/RkLunch-stop.sh
/Projects/luckfox_pico_rtsp_yolov5
;;
stop)
echo "Stopping..."
;;
*)
exit 1
;;
esac