Files
instack-undercloud/scripts/instack-haproxy-cert-update
Juan Antonio Osorio Robles faeed2494e Use certmonger for automatic cert generation
This will enable us to use a real CA to request the service certificates.

bp tls-via-certmonger

Depends-On: I32ded4e33abffd51f220fb8a7dc6263aace72acd
Change-Id: I5009273110154f0327ad542d75e83ff67bf72613
2016-08-03 13:44:21 +03:00

17 lines
438 B
Bash

#!/bin/bash
CERT_FILE="$1"
KEY_FILE="$2"
OUTPUT_FILE="$3"
if [[ -z "$CERT_FILE" || -z "$KEY_FILE" || -z "$OUTPUT_FILE" ]]; then
echo "You need to provide CERT_FILE KEY_FILE and finally OUTPUT_FILE" \
"as arguments in that order."
exit 1
fi
if [[ ! -f "$CERT_FILE" || ! -f "$KEY_FILE" ]]; then
echo "Certificate and key files must exist!"
exit 1
fi
cat $CERT_FILE $KEY_FILE > $OUTPUT_FILE
systemctl reload haproxy