buildx/keycloak/tools/vault.sh
2020-07-29 16:01:00 +02:00

14 lines
590 B
Bash
Executable File

#!/bin/bash
if [ -d "$JBOSS_HOME/secrets" ]; then
echo "set plaintext_vault_provider_dir=${JBOSS_HOME}/secrets" >> "$JBOSS_HOME/bin/.jbossclirc"
echo "set configuration_file=standalone.xml" >> "$JBOSS_HOME/bin/.jbossclirc"
$JBOSS_HOME/bin/jboss-cli.sh --file=/opt/jboss/tools/cli/files-plaintext-vault.cli
sed -i '$ d' "$JBOSS_HOME/bin/.jbossclirc"
echo "set configuration_file=standalone-ha.xml" >> "$JBOSS_HOME/bin/.jbossclirc"
$JBOSS_HOME/bin/jboss-cli.sh --file=/opt/jboss/tools/cli/files-plaintext-vault.cli
sed -i '$ d' "$JBOSS_HOME/bin/.jbossclirc"
fi