replace messages with progress bar, or dots
by aristosv from LinuxQuestions.org on (#5F7CN)
I am using this to check the status of a machine while is being build, so that I know when it's completed.
Code:while true
do
if [[ $(curl -s -H "Authorization: Bearer $apikey" $apiurl/instances | jq ".instances[] | select(.id==\"$machineid\") | .power_status") = *running* && $(curl -s -H "Authorization: Bearer $apikey" $apiurl/instances | jq ".instances[] | select(.id==\"$machineid\") | .server_status") = *installingbooting* ]]
then
echo "server is ready"
break
else
echo "server is being build"
fi
doneIt takes about a minute to build it, but until then it keeps sending "server is being build" messages.
Is there a way to convert it to a progress bar, or perhaps dots? Just to make it look better. The functionality is ok.


Code:while true
do
if [[ $(curl -s -H "Authorization: Bearer $apikey" $apiurl/instances | jq ".instances[] | select(.id==\"$machineid\") | .power_status") = *running* && $(curl -s -H "Authorization: Bearer $apikey" $apiurl/instances | jq ".instances[] | select(.id==\"$machineid\") | .server_status") = *installingbooting* ]]
then
echo "server is ready"
break
else
echo "server is being build"
fi
doneIt takes about a minute to build it, but until then it keeps sending "server is being build" messages.
Is there a way to convert it to a progress bar, or perhaps dots? Just to make it look better. The functionality is ok.