DD3AH icon

check for scheduled reboot

DD3AH | PRO | 07/07/21 08:45:25 AM UTC (Edited) | 0 ⭐ | 1842 👁️ | Never ⏰ | []
Bash |

530 B

|

None

|

0 👍

/

0 👎

#!/bin/bash
 
## CheckScheduledReboot
# (C)2021 [email protected]
# 
# Checks whether a shutdown is scheduled on a systemd-system
# and gives some information about it.
 
if [ -e /var/run/systemd/shutdown/scheduled ]
then
        (
        while read -r x
        do 
                declare -- "${x}"  
        done 
 
        echo -n "$MODE at "
        date -d "@${USEC::-6}"
        echo If unwanted, cancel with:
        echo shutdown -c 
        ) < /var/run/systemd/shutdown/scheduled
else
        echo none
fi

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎