Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Malinovich demonbane

View GitHub Profile
@BenSjoberg
BenSjoberg / when_shutdown.sh
Created Jan 11, 2017
Get systemd scheduled shutdown time
View when_shutdown.sh
#!/bin/bash
# Determines if a shutdown is scheuled and prints the time if so.
#
# Warning: Quick hack! Basically zero error tolerance.
#
# Designed for Ubuntu 16.04. Will probably work on other systemd-based distros,
# but I haven't tested it on anything else.
#
# There is almost certainly a better way to do this, but I got tired of looking.