Skip to content

Instantly share code, notes, and snippets.

@ichux
Created March 19, 2024 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichux/703982a107d53edfe19580b99ea88b86 to your computer and use it in GitHub Desktop.
Save ichux/703982a107d53edfe19580b99ea88b86 to your computer and use it in GitHub Desktop.
uid for supervisor
#!/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