Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checks if chia needs to initialize from a defined CA #218

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
if ! openssl verify -CAfile "${ca}/private_ca.crt" "${CHIA_ROOT}/config/ssl/harvester/private_harvester.crt" &>/dev/null; then
echo "initializing from new CA"
# shellcheck disable=SC2086
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
Expand Down