diff --git a/testbed/scripts/schedule-poweroff.sh b/testbed/scripts/schedule-poweroff.sh index 7af16cf..ada5464 100755 --- a/testbed/scripts/schedule-poweroff.sh +++ b/testbed/scripts/schedule-poweroff.sh @@ -1,7 +1,13 @@ #!/bin/bash set -ex +SKIP_FILE=/tmp/skip-poweroff /bin/date -/sbin/shutdown -h 60 -wall "The system shutdown is scheduled in 1 hour. Use 'shutdown -c' to cancel." -echo '' +if [[ -f "$SKIP_FILE" ]]; then + echo "poweroff skipped for this time." + rm -rf "$SKIP_FILE" +else + /sbin/shutdown -h 60 + wall "The system shutdown is scheduled in 1 hour. Use 'shutdown -c' to cancel." +fi +echo