From 92591224f210edb95e8103380a67db85e2916253 Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 30 Oct 2023 08:55:40 -0400 Subject: [PATCH] =?UTF-8?q?condi=C3=A7=C3=A3o=20do=20hd=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hdaux_utilitarios_scripts/temporizador_de_dados.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/asterisk/hdaux_utilitarios_scripts/temporizador_de_dados.sh b/asterisk/hdaux_utilitarios_scripts/temporizador_de_dados.sh index 716e56d..aad8442 100644 --- a/asterisk/hdaux_utilitarios_scripts/temporizador_de_dados.sh +++ b/asterisk/hdaux_utilitarios_scripts/temporizador_de_dados.sh @@ -116,13 +116,13 @@ function get_default_days(){ [[ -z size_hd ]] && exit - if [[ 255 > $size_hd ]]; then + if [[ 255 -gt $size_hd ]]; then echo 90 # dias - elif [[ 505 > $size_hd ]];then + elif [[ 505 -gt $size_hd ]];then echo 186 # dias - elif [[ 755 > $size_hd ]];then + elif [[ 755 -gt $size_hd ]];then echo 365 # dias else @@ -189,7 +189,7 @@ function get_data_days(){ days=$(get_data_txt) # retorno days vazio por erros ou days vazio por não definido - [[ $errno == 0 && $days -gt 30 ]] && insert_prm_log_dias_bd "$days" + [[ $errno == 0 && $days -gt 29 ]] && insert_prm_log_dias_bd "$days" else set_data_txt "$days" @@ -219,6 +219,7 @@ days="$(get_data_days)" # números positivos # números acima do 29 [[ -z "$days" || ! "$days" =~ ^[0-9][0-9]+$ || $days -lt 30 ]] && kill -9 $$ + set_logrotate "$days" remove_audio_wav "$days"