diff --git a/respawn b/respawn index f290fd0..dd8056a 100755 --- a/respawn +++ b/respawn @@ -12,13 +12,15 @@ SCOPE="repos" #TODO: ALERT if lxc command fails meaning lxd servcie is down CURRENT_RUNNER_COUNT=$(lxc ls | grep github-.*RUNNING.*EPHEMERAL | wc -l) -if [ $((( $SPAWN_COUNT - $CURRENT_RUNNER_COUNT ))) -eq 0 ] +if [ $((( $SPAWN_COUNT - $CURRENT_RUNNER_COUNT ))) -le 0 ] then exit 0 else SPAWN_COUNT=$((($SPAWN_COUNT - $CURRENT_RUNNER_COUNT))) fi +exit 0 + # This is done outside the scope of the LXD container because exporting variables is not working as expected _PROTO="$(echo "${RUNNER_URL}" | grep :// | sed -e's,^\(.*://\).*,\1,g')"