From a05598785a0654bcd97d662f563fe0d9b3f1a9a9 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Wed, 6 Nov 2024 22:02:13 +0100 Subject: [PATCH] Make generate-secrets.sh cross platform compatible (#72) --- generate-secrets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate-secrets.sh b/generate-secrets.sh index 11c0dba..4c99210 100755 --- a/generate-secrets.sh +++ b/generate-secrets.sh @@ -20,7 +20,7 @@ SALT_FILE="${PROGDIR}/secrets/DRUPAL_DEFAULT_SALT" readonly SALT_FILE if [ ! -f "${SALT_FILE}" ]; then echo "Creating: ${SALT_FILE}" >&2 - (grep -ao '[A-Za-z0-9_-]' "${SALT_FILE}" + docker run --rm -i --entrypoint bash "${BASE_IMAGE}" -c "(grep -ao '[A-Za-z0-9_-]' "${SALT_FILE}" fi # Use openssl to generate certificates. @@ -57,7 +57,7 @@ done < \ for secret in "${SECRETS[@]}"; do if [ ! -f "${secret}" ]; then echo "Creating: ${secret}" >&2 - (grep -ao "${CHARACTERS}" "${secret}" + docker run --rm -i --entrypoint bash "${BASE_IMAGE}" -c "(grep -ao '${CHARACTERS}' "${secret}" fi done