Add files related to SSL support.
This commit is contained in:
parent
0f5f0bb67f
commit
9ba9d5c90e
4 changed files with 50 additions and 3 deletions
26
scripts/create-combined-pemfile
Executable file
26
scripts/create-combined-pemfile
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue