try fix meshtasticd launch issue

This commit is contained in:
nagumii 2024-12-17 12:25:30 +02:00
parent 9a78f6242b
commit 9dc7fe6061
4 changed files with 6 additions and 3 deletions

BIN
foxbuntu/config.gz Normal file

Binary file not shown.

View file

@ -85,4 +85,4 @@ fi
done
) &
exit 0
exit 0

View file

@ -32,6 +32,9 @@ logger "$msg"
#/usr/local/bin/updatemeshtastic.sh "--set lora.region US" 10 "First boot"
/usr/local/bin/updatemeshtastic.sh "--set network.wifi_enabled true" 10 "First boot"
msg="First boot: Adding rc.local completion condition to Meshtasticd service."
echo "$msg"
logger "$msg"
sudo sed -i '/^After=network-online.target/a After=rc-local.service' /usr/lib/systemd/system/meshtasticd.service
systemctl daemon-reload

View file

@ -7,7 +7,7 @@ for retries in $(seq 1 $attempts); do
output=$(meshtastic --host 127.0.0.1 $command >&2) #>&2 lets meshtastic's output display on screen
if echo "$output" | grep -qiE "Abort|invalid|Error|refused"; then
if echo "$output" | grep -qiE "Abort|invalid|Error|refused|Errno"; then
if [ "$retries" -lt $attempts ]; then
msg="${ref:+$ref }Meshtastic update failed, retrying ($(($retries + 1))/$attempts)..."
echo "$msg"
@ -19,4 +19,4 @@ for retries in $(seq 1 $attempts); do
break
fi
done
exit 1 #failed
exit 1 #failed