From 9417a77511dd9592815d6009abec9c0efaca9319 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 3 Jun 2017 16:11:36 +0200 Subject: reproducible Debian: adapt for new build service Signed-off-by: Holger Levsen --- bin/reproducible_cleanup_nodes.sh | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'bin/reproducible_cleanup_nodes.sh') diff --git a/bin/reproducible_cleanup_nodes.sh b/bin/reproducible_cleanup_nodes.sh index 9656a651..9d64c8fa 100755 --- a/bin/reproducible_cleanup_nodes.sh +++ b/bin/reproducible_cleanup_nodes.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright © 2015-2016 Holger Levsen +# Copyright © 2015-2017 Holger Levsen # released under the GPLv=2 DEBUG=false @@ -19,15 +19,14 @@ elif [ "$(whoami)" != "jenkins" ] ; then exit 1 fi -# deny running this if jenkins is still running -if [ "$1" != "--force" ] ; then - RESULT=$(ps fax|grep '/usr/share/jenkins/jenkins.war'|grep -v grep||true) - if [ -n "$RESULT" ] ; then - echo "jenkins is still running, aborting." - exit 1 - else - echo "jenkins is not running, ok, let's go." - fi +# deny running this if build service is still running +SERVICE="reproducible_build@startup.service" +RESULT=$(systemctl show $SERVICE|grep ^ActiveState=active||true) +if [ -n "$RESULT" ] ; then + echo "$SERVICE is still running, aborting." + exit 1 +else + echo "$SERVICE is not running, ok, let's go." fi # simple confirmation needed @@ -46,13 +45,5 @@ for NODE in $BUILD_NODES ; do /srv/jenkins/bin/jenkins_master_wrapper.sh /srv/jenkins/bin/reproducible_slay.sh & done -sleep 15 -echo "killing all ssh and sleep processes now. (press enter || ctrl-c)" -read -set +e -killall ssh -killall sleep -killall -9 ssh -killall -9 sleep -echo "$(date -u) - slaughtering done. Happy rebooting or whatever you plan to do." +echo "$(date -u) - slaughtering done." -- cgit v1.2.3-54-g00ecf