summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-https10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/install-https b/scripts/install-https
index dd7b1db..143638e 100755
--- a/scripts/install-https
+++ b/scripts/install-https
@@ -45,15 +45,17 @@ op_import ()
# Create server.pem
{
cat "$C"
+ # If we have a chainfile, try to use it aswell
+ if [ -s "$CHAIN" ] && openssl x509 -noout -hash -in "$CHAIN" &> /dev/null \
+ && [ "$( grep -c '^-----END' "$CHAIN" )" = "$( grep -c '^-----BEGIN' "$CHAIN" )" ]; then
+ echo
+ cat "$CHAIN"
+ fi
echo
cat "$K"
} > "$CERT_KEY_FILE"
chmod 0600 "$CERT_KEY_FILE" || exit 4
rm -f -- "$C" "$K"
- # If we have a chainfile, try to use it aswell
- if [ -s "$CHAIN" ]; then
- openssl x509 -noout -hash -in "$CHAIN" >/dev/null 2>&1 && cp "$CHAIN" "$CHAIN_FILE"
- fi
post_setup_hook
return 0
}