balance-containers: ne pas démarrer le conteneur si il était éteint
This commit is contained in:
parent
a94f204647
commit
f5fef01a0c
@ -35,9 +35,13 @@ move_ct() {
|
||||
[[ $? -eq 0 ]] && echo "success" || echo "failed"
|
||||
|
||||
# Démarrer
|
||||
if [[ $(lxc list --columns s --format csv $ct 2> /dev/null) == "RUNNING" ]]; then
|
||||
echo -n " start: "
|
||||
lxc start $ct 2> /dev/null
|
||||
[[ $? -eq 0 ]] && echo "success" || echo "failed"
|
||||
else
|
||||
echo " start: skipped"
|
||||
fi
|
||||
}
|
||||
|
||||
# Boucler sur les arguments
|
||||
|
Loading…
Reference in New Issue
Block a user