Hi!
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.
Example:
Custom.sh
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:
#!/bin/bash
gpio mode 0 out
while(sleep 10)
do
temperature=$(< /sys/devices/virtual/thermal/thermal_zone1/temp)
lineToLog="FAN-"
if [ $temperature -gt 45 ]
then
lineToLog+="ON-"
lineToLog+="$temperature"
echo $lineToLog $(date) >> logfan.txt
gpio write 0 1
else
# lineToLog+="OFF-"
# lineToLog+="$temperature"
# echo $lineToLog $(date) >> logfan.txt
gpio write 0 0
fi
done
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.