view scripts/create-combined-pemfile @ 80:716f8305d412
Update lighttpd configuration files.
Lighttpd now requires explicitly specifying both IPv4 and IPv6
addresses.
author
John "Elwin" Edwards
date
Wed, 27 Dec 2017 14:54:58 -0500 (2017-12-27)
parents
c99fac2b0dc7
children
08c6e8c87caa
line source
+ − #!/bin/sh
+ − # Combines a private key and host cert into a single pemfile, for webservers
+ − # that require it.
+ −
+ − if [ $# -lt 1 ]
+ − then
+ − echo "No domains given."
+ − exit 1
+ − fi
+ −
+ − for DOMAIN in "$@"
+ − do
+ − LINKDIR=/etc/letsencrypt/live/"$DOMAIN"
+ − if [ ! -d "$LINKDIR" ]
+ − then
+ − echo "No certificates for $DOMAIN, skipping"
+ − continue
+ − fi
+ − REALCERTFILE=`readlink -f "$LINKDIR"/cert.pem`
+ − PEMFILE=`dirname "$REALCERTFILE"`/combined.pem
+ − touch "$PEMFILE"
+ − chown root:root "$PEMFILE"
+ − chmod 400 "$PEMFILE"
+ − cat "$LINKDIR"/privkey.pem "$LINKDIR"/cert.pem >"$PEMFILE"
+ − ln -s -f -r "$PEMFILE" "$LINKDIR"/combined.pem
+ − done