Hi,
sorry, i know that this should be a basic task and there are dozends of similar threads on the internet, but i can't get it to work for some reason.
I have a pi zero w with piCore 9.0.3 . Setup is done according to the README. I want to run a simple python script with a paho-mqtt client. The script itself runs perfectly when executed manually via ssh (no errors; values are received by mqtt broker). But it doesn't runns on boot.
My /opt/bootlocal.sh looks like this:
/usr/sbin/startserialtty &
# Set CPU frequency governor to ondemand (default is performance)
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Load modules
/sbin/modprobe i2c-dev
# Start openssh daemon
/usr/local/etc/init.d/openssh start
# ------ Put other system startup commands below this line
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
python3.6 /home/tc/app/mqtt-client.py 2>&1 > /tmp/python.log
iperf3 -s &
The python.log file is just there for testing. The script is not running with or without that log statement. If the statemant is there, the log file is created during boot. But it is empty.
It's not even the final mqtt script. There are no external sensors, etc. . Just a mqtt client that reports hard-coded values.
The iperf3 Server is also there for testing. It runns without any issue on boot.
I also tried another python script (a simple flask app). Same issue.
It's the first time that i use tinycore/picore. Normally i would use systemd for such a task