#!/bin/sh set -x HYDRA_CLIENTS_DIR=/etc/hydra/clients.d HYDRA_ADMIN_ENDPOINT=http://127.0.0.1:4445 for client_file in $HYDRA_CLIENTS_DIR/*.json; do client_id=$(basename "$client_file" | cut -f 1 -d '.') /usr/bin/hydra clients delete --skip-tls-verify --endpoint "$HYDRA_ADMIN_ENDPOINT" "$client_id" /usr/bin/hydra clients import --skip-tls-verify --endpoint "$HYDRA_ADMIN_ENDPOINT" "$client_file" done