This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from 6410180 killstalevms.bash: fix removing elements from arrays. new bdef3ce killstalevms.bash: terminate gracefully if the list of running VMs is empty. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: killstalevms.bash | 5 +++++ 1 file changed, 5 insertions(+) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
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