mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
24 lines
420 B
Bash
Executable File
24 lines
420 B
Bash
Executable File
#! /bin/bash
|
|
date
|
|
interval=20
|
|
timeout=300
|
|
command="xe host-list"
|
|
|
|
count=0
|
|
maxcount=$(($timeout/$interval))
|
|
|
|
|
|
until [ $count -gt $maxcount ]; do
|
|
if $command > /dev/null 2>&1; then
|
|
echo "\"$command\" executed successfully."
|
|
date
|
|
exit 0
|
|
fi
|
|
let count=count+1
|
|
echo "Waiting for \"$command\" to run successfully."
|
|
sleep $interval
|
|
done
|
|
|
|
echo "\"$command\" failed to complete."
|
|
date
|