Files
Bash_Scrips/scripts/tools/just_a_waiting_bar.sh
2025-06-23 21:19:51 +02:00

32 lines
774 B
Bash

#!/bin/bash
HOST_TO_UPDATE=Host1
OS_MASTER=Master1
function time_counter()
{
count=0
total=120
while [ $count -lt $total ]; do
sleep 0.5 # this is work
count=$(( $count + 1 ))
pd=$(( $count * 60 / $total ))
printf "\r${pd}s" $(( $count * 60 / $total ))
done
}
echo "Draining $HOST_TO_UPDATE"
echo "ssh -n $OS_MASTER "oc adm drain --ignore-daemonsets $HOST_TO_UPDATE""
echo "
________________________________________________________________________
< This will take a minute, Just making sure that the node is fully drained >
------------------------------------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\/
||----w |
|| ||
"
time_counter