diff --git a/data/patchs/root/usr/bin/jeedomLTE b/data/patchs/root/usr/bin/jeedomLTE index 4d29c18..80d0cef 100644 --- a/data/patchs/root/usr/bin/jeedomLTE +++ b/data/patchs/root/usr/bin/jeedomLTE @@ -22,6 +22,9 @@ # systemctl status jeedomLTE.service LOGFILE=/var/www/html/log/jeedomLTE +if [ ! -f "$LOGFILE" ]; then + touch "$LOGFILE" +fi chown www-data:www-data $LOGFILE DEBUG=true @@ -81,6 +84,7 @@ _modem_read_class_value() { local output=$(cat /sys/class/leds/$lte/brightness) if [ "$output" != "1" ]; then return 1 + fi done return 0 } @@ -112,6 +116,7 @@ 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 @@ -120,6 +125,8 @@ case "$1" in if [ "$content" != "1" ]; then echo "1" | tee /boot/jeedomLTE > /dev/null fi + sleep 20 + continue else max_attempts=5 for attempt in $(seq 1 $max_attempts); do