Container para emitir Certificados Let's Encrypt, com o Dehydrated
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
637 B

8 years ago
#!/bin/bash
set -e
#set -x
8 years ago
if [ "${LOG}" == "TRUE" ]; then
LOG_DIR=/var/log/letsencrypt
LOG_FILE=${LOG_DIR}/runtime.log
mkdir -p ${LOG_DIR}
touch ${LOG_FILE}
UUID=$(cat /proc/sys/kernel/random/uuid)
exec > >(read message; echo "${UUID} $(date -Iseconds) [info] $message" | tee -a ${LOG_FILE} )
exec 2> >(read message; echo "${UUID} $(date -Iseconds) [error] $message" | tee -a ${LOG_FILE} >&2)
fi
if [ "${LE_ENV}" == 'production' ]; then
8 years ago
echo "***** ${LE_ENV} *****"
sed -i 's@CA=.*@CA="https://acme-v01.api.letsencrypt.org/directory"@g' /etc/dehydrated/config
8 years ago
else
echo "***** staging *****"
8 years ago
fi
echo "${@}"
exec "${@}"