Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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