Skip to content

Commit

Permalink
add more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotfirenet committed Jul 12, 2024
1 parent acdffee commit 6852fee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion data/patchs/root/usr/bin/jeedomLTE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ ! -f "$LOGFILE" ]; then
touch "$LOGFILE"
fi
chown www-data:www-data $LOGFILE
DEBUG=false
DEBUG=true

#Todo: Add debug option with systemctl start jeedomLTE.service option
# while [[ "$#" -gt 0 ]]; do
Expand Down Expand Up @@ -112,6 +112,7 @@ case "$1" in
*)
while true
do
debug_log "Start loop."
_modem_exists
result=$?
debug_log "Connection result: $result"
Expand All @@ -124,11 +125,13 @@ case "$1" in
if [ "$content" != "1" ]; then
echo "1" | tee /boot/jeedomLTE > /dev/null
fi
debug_log "Modem is already connected check."
DEBUG=false
sleep 20
continue
else
DEBUG=true
debug_log "Modem is not connected."
max_attempts=5
for attempt in $(seq 1 $max_attempts); do
debug_log "Reconnection attempt $attempt of $max_attempts."
Expand Down Expand Up @@ -165,6 +168,7 @@ case "$1" in
fi
fi
sleep 20
debug_log "End of loop."
done
;;
esac

0 comments on commit 6852fee

Please sign in to comment.