Skip to content

Commit

Permalink
Feat: Debug if modem is out
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotfirenet committed Jul 12, 2024
1 parent 8a91bf0 commit adc3a58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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=true
DEBUG=false

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

0 comments on commit adc3a58

Please sign in to comment.