Created
March 19, 2024 09:14
-
-
Save ichux/703982a107d53edfe19580b99ea88b86 to your computer and use it in GitHub Desktop.
uid for supervisor
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 ! command -v openssl &> /dev/null; then | |
echo "'openssl' could not be found. Please install it" | |
exit 0 | |
else | |
if [ ! $1 ]; then | |
echo "Usage: 'source filename.sh password'" | |
else | |
# http://supervisord.org/configuration.html#unix_http_server | |
if [ "$(uname)" == "Darwin" ]; then | |
printf $1 | openssl dgst -sha1 | xargs -I RESPONSE echo "{SHA}"RESPONSE | |
else | |
printf $1 | openssl dgst -sha1 | xargs -iRESPONSE echo "{SHA}"RESPONSE | |
fi | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment