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.
 
 

26 lines
826 B

#!/bin/bash
. lib/common
## XXXvlab: should get location of code
#CONFIG=$(echo $COMPOSE_CONFIG | shyaml get-value $SERVICE_NAME.relations.publish-dir...)
# CONFIG="$SERVICE_DATASTORE/opt/apps/piwigo/local/config/database.inc.php"
set -e
PASSWORD="$(relation-get password)"
USER="$(relation-get user)"
DBNAME="$(relation-get dbname)"
crudini --set "$MATOMO_CONFIG_FILE" database host "\"$TARGET_SERVICE_NAME\""
crudini --set "$MATOMO_CONFIG_FILE" database username "\"$USER\""
crudini --set "$MATOMO_CONFIG_FILE" database password "\"$PASSWORD\""
crudini --set "$MATOMO_CONFIG_FILE" database dbname "\"$DBNAME\""
crudini --set "$MATOMO_CONFIG_FILE" database tables_prefix "\"\""
crudini --set "$MATOMO_CONFIG_FILE" database charset "\"utf8mb4\""
info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access."