X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=inline;f=buildd-reboot;h=237fb8b8b0e38304872e629501a532f121ae295a;hb=f0d5b2ab28621ea2f853cbd97942e326fcb1670a;hp=c454a400b69fe31fc6799c313e245d96ee3b7a5c;hpb=1684171aa0aa7237b64573691b6dcd459b15adb8;p=dsa-metapackages.git diff --git a/buildd-reboot b/buildd-reboot index c454a40..237fb8b 100755 --- a/buildd-reboot +++ b/buildd-reboot @@ -100,13 +100,17 @@ if ! [ -d ~buildd ]; then fi if ! test -e ~buildd/NO-DAEMON-PLEASE; then - echo "Touching ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE" - sudo -u buildd touch ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE - sudo -u buildd sh -c 'echo delete-on-boot > ~buildd/NO-DAEMON-PLEASE' - sudo chgrp -v adm ~buildd/NO-DAEMON-PLEASE - - echo "Sending HUP to buildd" - sudo -u buildd kill -HUP `sudo cat ~buildd/build/buildd.pid` + if [ -e ~buildd/build/buildd.pid ] ; then + echo "Touching ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE" + sudo -u buildd touch ~buildd/NO-DAEMON-PLEASE ~buildd/EXIT-DAEMON-PLEASE + sudo -u buildd sh -c 'echo delete-on-boot > ~buildd/NO-DAEMON-PLEASE' + sudo chgrp -v adm ~buildd/NO-DAEMON-PLEASE + + echo "Sending HUP to buildd" + sudo -u buildd kill -HUP `sudo cat ~buildd/build/buildd.pid` + else + echo "no-daemon-please does not exist, but there is no buildd.pid file either" + fi else echo "no-daemon-please already exists" fi