Created
June 11, 2018 00:42
-
-
Save peterbe/0e676a4183167f54da5bf3d670acb7e3 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 | |
set -eo pipefail | |
hostandport=$1 | |
shift | |
curl -s "$hostandport" >/dev/null && \ | |
echo "Already running on $hostandport" && \ | |
exit 1 || exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install, run:
Read the blog post for more info.