buildx/keycloak/tools/statistics.sh

13 lines
393 B
Bash
Raw Normal View History

2020-07-29 14:01:00 +00:00
#!/bin/bash
if [ -n "$KEYCLOAK_STATISTICS" ]; then
IFS=',' read -ra metrics <<< "$KEYCLOAK_STATISTICS"
for file in /opt/jboss/tools/cli/metrics/*.cli; do
name=${file##*/}
base=${name%.cli}
if [[ $KEYCLOAK_STATISTICS == *"$base"* ]] || [[ $KEYCLOAK_STATISTICS == *"all"* ]]; then
$JBOSS_HOME/bin/jboss-cli.sh --file="$file" >& /dev/null
fi
done
fi