use lego from baseimage
This commit is contained in:
parent
51cc43c11d
commit
c0e510acba
7 changed files with 9 additions and 79 deletions
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
SAN_DOMAINS=""
|
||||
|
||||
export IFS=";"
|
||||
for SAN in ${POSTGRES_SAN}
|
||||
do
|
||||
SAN_DOMAINS="${SAN_DOMAINS} --domains=\"${SAN}\""
|
||||
done
|
||||
|
||||
echo ${SAN_DOMAINS}
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
cd /var/lib/postgresql
|
||||
|
||||
SAN_DOMAINS=$(/bin/concat-sans)
|
||||
|
||||
OLD_MOD=$(stat -c %y /var/lib/postgresql/.lego/certificates/${POSTGRES_DOMAIN}.crt)
|
||||
|
||||
lego \
|
||||
--accept-tos \
|
||||
--server="${POSTGRES_CA}" \
|
||||
--email="${POSTGRES_ACME_EMAIL}" \
|
||||
--domains="${POSTGRES_DOMAIN}" ${SAN_DOMAINS} \
|
||||
--dns="${POSTGRES_DNS_PROVIDER}" \
|
||||
renew --days 30
|
||||
|
||||
NEW_MOD=$(stat -c %y /var/lib/postgresql/.lego/certificates/${POSTGRES_DOMAIN}.crt)
|
||||
|
||||
if [ "${OLD_MOD}" != "${NEW_MOD}" ]; then
|
||||
kill -s TERM $(head -1 ${PGDATA}/postmaster.pid)
|
||||
fi
|
3
rootfs/bin/restart-services
Normal file
3
rootfs/bin/restart-services
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/with-contenv sh
|
||||
|
||||
kill -s TERM $(head -1 ${PGDATA}/postmaster.pid)
|
Loading…
Add table
Add a link
Reference in a new issue