Last active
June 3, 2025 03:01
-
-
Save zh/1b651a7bc6337bb41d5374b25402d728 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
#!/bin/sh | |
# | |
# Purpose: send active user info to AWS Lambda | |
echo "Hostname: ${ORCHID_HOSTNAME}" | |
echo "Subdomain: ${SUBDOMAIN}" | |
echo "Database: ${REDMINE_DB_POSTGRES} ${REDMINE_DB_DATABASE}" | |
echo "Response:" | |
echo | |
/usr/local/bin/aws lambda invoke \ | |
--cli-binary-format raw-in-base64-out \ | |
--function-name health-score-test \ | |
--output text \ | |
--payload "$(echo '{"HOSTNAME":"'"$ORCHID_HOSTNAME"'","SUBDOMAIN":"'"$SUBDOMAIN"'","env":{"DB_HOST":"'"$REDMINE_DB_POSTGRES"'","DB_NAME":"'"$REDMINE_DB_DATABASE"'","DB_USER":"'"$REDMINE_DB_USERNAME"'","DB_PASSWORD":"'"$REDMINE_DB_PASSWORD"'"}}')" \ | |
/dev/stdout 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment