This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit bdef3ce19406a73e10b962c07e72ab94e3e5b263 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Feb 12 04:14:26 2015 +0100 killstalevms.bash: terminate gracefully if the list of running VMs is empty. --- killstalevms.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/killstalevms.bash b/killstalevms.bash index 86f8ccd..fb3956f 100644 --- a/killstalevms.bash +++ b/killstalevms.bash @@ -58,6 +58,11 @@ while [ "${RESULT}" -eq "0" ]; do if [ "${RESULT}" -eq "0" ]; then echo kill -9 "${VM_LIST[${MOREINFO}]}" + # Terminate, if we just killed the last process in the list. + if [ "${#VM_LIST[@]}" -eq "1" ]; then + RESULT="1" + fi + # Remove current element from lists. VM_LIST=("${VM_LIST[@]:0:${MOREINFO}}" "${VM_LIST[@]:${MOREINFO} + 1}") BUILDER_LIST=("${BUILDER_LIST[@]:0:${MOREINFO}}" "${BUILDER_LIST[@]:${MOREINFO} + 1}") -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git