Skip to content

Instantly share code, notes, and snippets.

View BenSjoberg's full-sized avatar

Ben Sjoberg BenSjoberg

  • Amazon Web Services
  • Seattle, WA
View GitHub Profile
@BenSjoberg
BenSjoberg / when_shutdown.sh
Created January 11, 2017 19:47
Get systemd scheduled shutdown time
#!/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.