Created
June 27, 2017 14:50
-
-
Save drahosistvan/2d7aa9b7ec1d7adfd40684e591ae4ae2 to your computer and use it in GitHub Desktop.
Check if restart required on Ubuntu
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/bash | |
if [ ! -f /var/run/reboot-required ]; then | |
# no reboot required (0=OK) | |
echo "OK: no reboot required" | |
exit 0 | |
else | |
# reboot required (1=WARN) | |
echo "WARNING: `cat /var/run/reboot-required`" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basic installation:
wget "https://gist.githubusercontent.com/drahosistvan/2d7aa9b7ec1d7adfd40684e591ae4ae2/raw/bc444b9d5656af75a6fce21240459a38eac90560/restart-required.sh" && chmod +x restart-required.sh