Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | { |
| 6 | domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local} |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 7 | live=/etc/nginx/certs/live |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 8 | |
Nico Huber | 15edd77 | 2023-07-01 18:16:50 +0000 | [diff] [blame] | 9 | 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 Huber | 2a12889 | 2023-07-25 17:19:42 +0000 | [diff] [blame^] | 17 | chmod -R go-w /etc/nginx/certs/live/ |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 18 | } |
| 19 | |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame] | 20 | exec /docker-entrypoint.sh "$@" |