10 lines
332 B
Bash
10 lines
332 B
Bash
#!/bin/bash
|
|
CURRENT_TIME=$(date +%H:%M)
|
|
SCH_SHUTDOWN_TIME="01:00"
|
|
|
|
if [[ $CURRENT_TIME > "00:00" ]] && [[ $CURRENT_TIME < "08:30" ]]; then
|
|
echo "Triggering scheduled post-backup shutdown at $SCH_SHUTDOWN_TIME"
|
|
shutdown -P $SCH_SHUTDOWN_TIME
|
|
else
|
|
echo "Automatic shutdown not triggered due to current time"
|
|
fi |