check if VM is already running before deploying
This commit is contained in:
parent
db076d5a34
commit
c40181bf7b
@ -41,6 +41,11 @@ else
|
||||
chmod 600 ${VMS}/${1}.txt
|
||||
fi
|
||||
|
||||
if vmctl show ${1} | grep running >/dev/null 2>&1; then
|
||||
echo "ERR: VM ${1} is already running..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INSTANCE=$(awk -F'=' '/^instance/ {print $2}' ${VMS}/${1}.txt | tr -d '"')
|
||||
if [[ -z ${INSTANCE} ]]; then
|
||||
INSTANCE=${1}
|
||||
|
Loading…
Reference in New Issue
Block a user