first commit
This commit is contained in:
21
opensem/hooks/redis_database-relation-joined
Executable file
21
opensem/hooks/redis_database-relation-joined
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
. lib/common
|
||||
|
||||
set -e
|
||||
|
||||
password=$(relation-get password) || {
|
||||
err "Can't get password for '$SERVICE_NAME' from '$TARGET_SERVICE_NAME'."
|
||||
exit 1
|
||||
}
|
||||
|
||||
cat <<EOF >> "${OPENSEM_CONFIG_FILE}"
|
||||
|
||||
BROADCAST_DRIVER=redis
|
||||
REDIS_HOST=${TARGET_SERVICE_NAME}
|
||||
REDIS_PASSWORD=$password
|
||||
REDIS_PORT=6379
|
||||
EOF
|
||||
|
||||
|
||||
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."
|
||||
Reference in New Issue
Block a user