Created
March 13, 2020 18:42
-
-
Save jakobrs/27192a20516085f1ae66f2ec7d9e5453 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env nix-shell | |
#! nix-shell -p jq -i bash | |
# Usage: | |
# ./script.sh <server name> <delay> | |
echo "Monitoring $1 with $2 seconds delay between checks" | |
while true; do | |
date | tr '\n' ' ' | |
mcstatus "$1" json | jq '.players | map(.name)' -c | |
sleep "$2" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment