2024-07-19 05:27:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
|
|
|
|
cert_file="/app/tls/statechannels.org.pem"
|
|
|
|
key_file="/app/tls/statechannels.org_key.pem"
|
|
|
|
|
|
|
|
# Check if the cert already exists
|
|
|
|
if [ -f "$cert_file" ] ; then
|
|
|
|
echo "Cert file ${cert_file} already exists"
|
|
|
|
else
|
|
|
|
echo "Creating certs"
|
2024-07-23 06:40:19 +00:00
|
|
|
mkcert -cert-file $cert_file -key-file $key_file statechannels.org localhost 127.0.0.1 $NITRO_PUBLIC_RPC_HOST ::1
|
2024-07-19 05:27:46 +00:00
|
|
|
|
|
|
|
# Copy over the rootCA cert so that it can be used by the client
|
|
|
|
cp -r $(mkcert -CAROOT)/* /app/mkcert-caroot
|
|
|
|
fi
|