diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 4844d83..17fae88 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,8 +15,13 @@ cd /chia-blockchain || exit 1 chia ${chia_args} init --fix-ssl-permissions if [[ -n ${ca} ]]; then - # shellcheck disable=SC2086 - chia ${chia_args} init -c "${ca}" + openssl verify -CAfile ${ca}/private_ca.crt ${CHIA_ROOT}/config/ssl/harvester/private_harvester.crt &>/dev/null + if [ ${?} -ne 0 ]; then + echo "initializing from new CA" + chia ${chia_args} init -c "${ca}" + else + echo "using existing CA" + fi fi # Enables whatever the default testnet is for the version of chia that is running