initial commit
This commit is contained in:
15
scripts/generate-self-signed.sh
Normal file
15
scripts/generate-self-signed.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CERT_DIR="${1:-./traefik/certs}"
|
||||
HOSTNAME="${2:-localhost}"
|
||||
|
||||
mkdir -p "${CERT_DIR}"
|
||||
|
||||
openssl req -x509 -nodes -newkey rsa:2048 \
|
||||
-keyout "${CERT_DIR}/traefik.key" \
|
||||
-out "${CERT_DIR}/traefik.crt" \
|
||||
-days 365 \
|
||||
-subj "/CN=${HOSTNAME}"
|
||||
|
||||
echo "Generated certs in ${CERT_DIR} for CN=${HOSTNAME}"
|
||||
Reference in New Issue
Block a user