Compare commits

..

No commits in common. "c15224cb1c8ad2720013493589f24b149ca9a612" and "7599a9435eba7a39473e6ff08125ad7bdcb5f258" have entirely different histories.

View File

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
# about script
version="17/06/2023"
PRMT="[$(whoami)@$(hostname -s) ]" PRMT="[$(whoami)@$(hostname -s) ]"
@ -26,7 +24,7 @@ function askYesNo {
} }
_logs3days(){ _logs3days(){
files3d=($(find . -maxdepth 1 ! -iname "*log*.sh" -mtime -3 -iname "*logs*" -o -mtime -3 -iname "*vm_lic*" -o -mtime -3 -iname "*vm_node*" -o -mtime -3 -iname "*short-logs*")); files3d=($(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*"));
if [[ ${#files3d[@]} >0 ]];then if [[ ${#files3d[@]} >0 ]];then
echo -e "\n*********************** platform's logs for last 3 days *************************\n"; echo -e "\n*********************** platform's logs for last 3 days *************************\n";
for item3d in ${files3d[*]} for item3d in ${files3d[*]}
@ -41,7 +39,7 @@ _logs3days(){
} }
_remove_logs (){ _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")); 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*"));
if [[ ${#files[@]} >0 ]];then if [[ ${#files[@]} >0 ]];then
echo "founded platform logs older than last 3 days"; echo "founded platform logs older than last 3 days";
@ -209,6 +207,8 @@ node_collect() {
} }
_help(){ _help(){
# about script
version="15/04/23"
echo -e "*********************************************************************************"; echo -e "*********************************************************************************";
echo -e "*\t\t\tISPsystem technical support\t\t\t\t*"; echo -e "*\t\t\tISPsystem technical support\t\t\t\t*";
echo -e "*\t\t\tLog's script ver.: $version\t\t\t\t*"; echo -e "*\t\t\tLog's script ver.: $version\t\t\t\t*";
@ -221,8 +221,6 @@ echo -e "\t-lic or 3\t\t\t\t logs about license";
echo -e "\t-node or 4 <IP-address> <SSH-port>\t node's logs\n"; echo -e "\t-node or 4 <IP-address> <SSH-port>\t node's logs\n";
_logs3days; _logs3days;
_remove_logs;
echo -e "\t\t\t\t *** MENU ***\t\t\t\t\n"; echo -e "\t\t\t\t *** MENU ***\t\t\t\t\n";
PS3='Please enter your choice(enter number): ' PS3='Please enter your choice(enter number): '
# interactive menu # interactive menu
@ -260,10 +258,10 @@ select opt in "${options[@]}"
_remove_logs; _remove_logs;
break break
;; ;;
*) echo "invalid option $REPLY";;
"Quit") "Quit")
break; break
;; ;;
*) echo "invalid option $REPLY";; *) echo "invalid option $REPLY";;
esac esac
done done