After update from 6.19.x to 6.20.5 and later to 6.20.6, a script that I added to Custom.sh refuses to start. I am not sure after which update it happened.
Custom.sh runs the commands before my script, but stops when reach it.
# - Chromium
# - LXDE
# - Print hello
#echo -e "Hello"
#---Put your code below this line---
#sudo mount /dev/sda1 /media/usb_hdd
sudo echo 'custom.sh start' >> /home/dietpi/startup.txt
sudo echo 'custom.sh end' >> /home/dietpi/startup.txt
After I remove my script from Custom.sh
If manually run my script it works.
Also my script is running in infinite loop, may that be the problem?
*Sorry if my English is bad!
What you mean by infinite loop?
You should see related output on the terminal at end of boot stage. Also check: systemctl status dietpi-autostart_custom
And finally if you could paste the output of your script, we could run some local tests. In some cases systemd units/services behave different than running a script/command directly from shell.
Unfortunately my sd card died (this is my 3dr dead card) and I can’t get any data out of it, nigher I have a backup. It would take a while until I get a new one and reproduce the same setup.
If you still want to run your tests, my script was something like that:
gpio mode 0 out
if [ $temperature -gt 45 ]
echo $lineToLog $(date) >> logfan.txt
gpio write 0 1
# echo $lineToLog $(date) >> logfan.txt
gpio write 0 0
I am not sure if this would work, cuz I can’t test it right now.
Also I forget to mention that I was using Orange Pi Zero.