This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# hibereboot: A 'hibernate & reboot' one-shot hack script for systemd-based hosts | |
# | |
# Place this script somewhere in your $PATH and run it (as root) to hibernate and reboot. | |
# For full automation, allow the script to be run with passwordless-sudo: | |
# | |
# > /etc/sudoers | |
# yourusername ALL=(ALL) SETENV:NOPASSWD: /path/to/hibereboot |