Minor code adjustment

This commit is contained in:
bergware
2024-12-29 19:58:59 +01:00
parent 92e758568f
commit d346544575
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ case "$1" in
echo "$DAEMON running"
else
echo "$DAEMON not running"
if [ -f $PID ]; then
if [[ -f $PID ]]; then
rm -f $PID
fi
fi

View File

@@ -60,7 +60,7 @@ vmlist(){
waitfor(){
local C=0
while [[ $C -lt $TIMEOUT && $(virsh list --state-$1 | awk "NR>2 && /${2:-^.+$}/" | wc -l) -gt 0 ]]; do
if [ $C -eq 0 ]; then # echo Timeout info just one time and only if virsh returned something
if [[ $C -eq 0 ]]; then # echo Timeout info just one time and only if virsh returned something
log "Waiting $TIMEOUT seconds for VMs with state: $1"
fi
((C++))