Created
January 15, 2015 00:54
-
-
Save flammable/d3dd738891fdb69bacc4 to your computer and use it in GitHub Desktop.
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 | |
if [[ -n $(/usr/bin/who | /usr/bin/awk '/console/ { print $1}') ]]; then | |
# Someone is logged in. Installation will proceed. | |
exit 0 | |
else | |
# Nobody is logged in. Canceling installation. | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment