yet another try fix usbconfig

This commit is contained in:
nagumii 2024-12-18 00:09:02 +02:00
parent dd57beb2a4
commit dd19580e6c

View file

@ -5,8 +5,9 @@ attempts=$2
ref="$3: "
for retries in $(seq 1 $attempts); do
output=$(meshtastic --host 127.0.0.1 $command >&2) #>&2 lets meshtastic's output display on screen
output=$(meshtastic --host 127.0.0.1 $command) #>&2 lets meshtastic's output display on screen
echo $output
logger $output
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)..."