#!/bin/bash ## 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)" # control=$(echo -en "$USER\0$DBNAME\0$PASSWORD" | md5_compat) #[ "$control" == "$(relation-get control)" ] && exit 0 ## creation of config file is done through install.php in post_deploy ## Do not support \ and ' or \n in DBNAME, PASSWORD. # file_put "$CONFIG" <