Created
October 10, 2017 01:55
-
-
Save theeye-io/053bd502550e0918f9cb17d9a818aaed to your computer and use it in GitHub Desktop.
This script verifies if a Linux host ran less than 1 minute.
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
read -d. uptime < /proc/uptime | |
if (( uptime > 1 )) | |
then | |
echo failure | |
else | |
echo normal | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment