first commit
This commit is contained in:
32
scripts/tools/just_a_waiting_bar.sh
Normal file
32
scripts/tools/just_a_waiting_bar.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/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
|
Reference in New Issue
Block a user