diff --git a/data/patchs/root/usr/bin/jeedomLTE b/data/patchs/root/usr/bin/jeedomLTE index 80d0cef..a3198f5 100644 --- a/data/patchs/root/usr/bin/jeedomLTE +++ b/data/patchs/root/usr/bin/jeedomLTE @@ -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 @@ -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 @@ -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."