OpenSlides/haproxy/prepare-cert.sh

18 lines
382 B
Bash
Raw Normal View History

2020-07-16 15:20:07 +02:00
#!/bin/bash
set -e
cd "$(dirname "$0")"
# check, if we already generated a cert
combined="src/combined.pem"
if [[ ! -f $combined ]]; then
echo "Creating certificates..."
cd src
mkcert -cert-file localhost.pem -key-file localhost-key.pem localhost 127.0.0.1
cat localhost.pem localhost-key.pem > combined.pem
echo "done"
else
echo "Certificate exists."
fi