| #!/bin/sh | |
| set -eu | |
| STATE_DIR="${STATE_DIR:-state}" | |
| KEY_FILE="$STATE_DIR/hypercorn/secrets/localhost.apache.org+2-key.pem" | |
| CERT_FILE="$STATE_DIR/hypercorn/secrets/localhost.apache.org+2.pem" | |
| if [ ! -f "$KEY_FILE" ] || [ ! -f "$CERT_FILE" ] | |
| then | |
| echo "Error: TLS certificates not found" >&2 | |
| echo "This may be due to the new layout of the state directory" >&2 | |
| echo "Running 'make certs-local' for you automatically" >&2 | |
| echo "Don't forget to clean up the old certificates" >&2 | |
| make certs-local | |
| fi |