/tmp/skip-poweroff to skip poweroff
This commit is contained in:
parent
7f3d5be51c
commit
ab7a00c7c7
|
@ -1,7 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
SKIP_FILE=/tmp/skip-poweroff
|
||||||
/bin/date
|
/bin/date
|
||||||
/sbin/shutdown -h 60
|
if [[ -f "$SKIP_FILE" ]]; then
|
||||||
wall "The system shutdown is scheduled in 1 hour. Use 'shutdown -c' to cancel."
|
echo "poweroff skipped for this time."
|
||||||
echo ''
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user