blob: 2af13cb70bdcbd68d864bd235c93c393f4d4f81b [file] [log] [blame]
Nico Huberd6528722023-07-01 14:38:39 +00001#!/bin/sh
2
3set -e
4
5{
6 domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local}
Nico Huber15edd772023-07-01 18:16:50 +00007 live=/etc/nginx/certs/live
Nico Huberd6528722023-07-01 14:38:39 +00008
Nico Huber15edd772023-07-01 18:16:50 +00009 if [ ! -f ${live}/${domain}/privkey.pem ]; then
10 mkdir -p ${live}/${domain}
11 cp /etc/ssl/private/sa-selfsigned.key ${live}/${domain}/privkey.pem
12 cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/fullchain.pem
13 cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/chain.pem
14 cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/cert.pem
15 fi
16
Nico Huber2a128892023-07-25 17:19:42 +000017 chmod -R go-w /etc/nginx/certs/live/
Nico Huberd6528722023-07-01 14:38:39 +000018}
19
Nico Huberd6528722023-07-01 14:38:39 +000020exec /docker-entrypoint.sh "$@"