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
518 B

#!/bin/bash
. lib/common
PASSWORD="$(relation-get password)"
USER="$(relation-get user)"
DBNAME="$(relation-get dbname)"
control=$(H "$USER" "$DBNAME" "$PASSWORD")
[ "$control" == "$(relation-get control || true)" ] && exit 0
set -e
wp-cli:run config create \
--dbname="$DBNAME" \
--dbuser="$USER" \
--dbpass="$PASSWORD" \
--dbhost="$TARGET_SERVICE_NAME" \
--skip-check
relation-set control "$control"
info "Configured wordpress code for mysql access."