Created
July 18, 2018 21:25
-
-
Save kkirsche/8cbcababa2ac6bd63f97962351efa406 to your computer and use it in GitHub Desktop.
Checks if a CentOS system requires a reboot or not. Good for login processes
This file contains 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/bash | |
# requires yum-utils to be installed | |
if ! needs-restarting -r 2>&1 >> /dev/null; then | |
echo '**System Restart Required**' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment