fix: resolve shellcheck SC2181

https://www.shellcheck.net/wiki/SC2181
This commit is contained in:
Martin Wimpress 2024-05-09 11:22:46 +01:00 committed by Martin Wimpress
parent 42a3476508
commit efea85695b
1 changed files with 1 additions and 2 deletions

View File

@ -1925,8 +1925,7 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
VM_UP=0 VM_UP=0
if [ -r "${VMDIR}/${VMNAME}.pid" ]; then if [ -r "${VMDIR}/${VMNAME}.pid" ]; then
VM_PID=$(head -c50 "${VMDIR}/${VMNAME}.pid") VM_PID=$(head -c50 "${VMDIR}/${VMNAME}.pid")
kill -0 ${VM_PID} > /dev/null 2>&1 if kill -0 "${VM_PID}" > /dev/null 2>&1; then
if [ $? -eq 0 ]; then
echo "VM already started!" echo "VM already started!"
VM_UP=1 VM_UP=1
fi fi