nginx/init-docker

14 lines
393 B
Plaintext
Raw Normal View History

#!/bin/sh
TMPDIR=/tmp
LEGODIR=/etc/nginx/conf.d/ssl/lego
# Create our MD5 of our certifcates in /tmp
for cert in $(lego --path ${LEGODIR} list |grep Certificate\ Path|awk '{print $3}'); do
OUTPUT=$(basename ${cert})
echo "- Creating MD5 of [${cert}] in [${TMPDIR}/${OUTPUT}]"
cat ${cert} | md5sum > ${TMPDIR}/${OUTPUT}.md5
done
exec /usr/sbin/nginx -g "daemon off;"