fix check and removing logs
This commit is contained in:
parent
1b230192ed
commit
c9f348b0ec
@ -44,7 +44,7 @@ _remove_logs (){
|
||||
files=($(find . -maxdepth 1 -mtime +3 -iname "*logs*" -o -mtime +3 -iname "*vm_lic*" -o -mtime +3 -iname "*vm_node*" -o -mtime +3 -iname "*short-logs*" ! -iname "get*log*.sh"));
|
||||
|
||||
if [[ ${#files[@]} >0 ]];then
|
||||
echo "\n************* Founded platform logs older than last 3 days **********************\n";
|
||||
echo -e "\n************* Founded platform logs older than last 3 days **********************\n";
|
||||
for item in ${files[*]}
|
||||
do
|
||||
# printf " %s\n" $item
|
||||
@ -57,7 +57,7 @@ _remove_logs (){
|
||||
if [ "$DOIT" = true ]; then
|
||||
for item in ${files[*]}
|
||||
do
|
||||
printf "********* deleting %s ************\n" $item;
|
||||
printf "\n>>>>> Deleting %s \n" $item;
|
||||
rm -rfv $item;
|
||||
done
|
||||
echo "Platform logs older than 3 days have been deleted!";
|
||||
|
Reference in New Issue
Block a user