You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
515 B

  1. #!/bin/bash
  2. set -e
  3. PEERTUBE_CONFIG_DIR=/etc/peertube
  4. HOST_CONFIG_DIR=$SERVICE_CONFIGSTORE/$PEERTUBE_CONFIG_DIR
  5. PASSWORD="$(relation-get password)"
  6. USER="$(relation-get user)"
  7. DBNAME="$(relation-get dbname)"
  8. cat <<EOF >> "$HOST_CONFIG_DIR/local.yaml"
  9. database:
  10. hostname: '$TARGET_SERVICE_NAME'
  11. ## We had to patch peertube to have a direct dbname (doh!)
  12. dbname: '$DBNAME'
  13. port: 5432
  14. username: '$USER'
  15. password: '$PASSWORD'
  16. EOF
  17. info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."