From 5231bb9b4f0d5cc0815a54c2610516a3c358b1f8 Mon Sep 17 00:00:00 2001 From: Yasin Kaya Date: Tue, 9 Feb 2021 16:31:44 +0000 Subject: [PATCH] delete logger --- src/ppp_connection_manager.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/ppp_connection_manager.sh b/src/ppp_connection_manager.sh index 43fa8bb..94fbe3e 100644 --- a/src/ppp_connection_manager.sh +++ b/src/ppp_connection_manager.sh @@ -2,20 +2,9 @@ source functions.sh -LOG_FOLDER="./logs" -LOG_FILE_NAME=$(date "+%Y_%m_%d_%H:%M:%S") - -if [[ -e $LOG_FOLDER ]]; then - debug "Log folder already exist!" -else - sudo mkdir $LOG_FOLDER - debug "Log folder is created." -fi - for i in {1..4}; do - bash configure_modem.sh |& sudo tee -a ./logs/$LOG_FILE_NAME.log - MODEM_CONFIG=${PIPESTATUS[0]} # compatible with only bash - + bash configure_modem.sh + if [[ $MODEM_CONFIG -eq 0 ]]; then break fi @@ -23,7 +12,7 @@ for i in {1..4}; do done if [[ $MODEM_CONFIG -eq 0 ]]; then - bash ppp_reconnect.sh |& sudo tee -a ./logs/$LOG_FILE_NAME.log + bash ppp_reconnect.sh else debug "Modem configuration is failed multiple times!" debug "Checkout other troubleshooting steps on docs.sixfab.com."