18 lines
848 B
Bash
18 lines
848 B
Bash
#!/bin/sh
|
|
set -eu
|
|
umask 077
|
|
test "$(id -u)" = 0
|
|
test -d /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org
|
|
install -d -m 700 /etc/white-proxy-letsencrypt /var/lib/white-proxy-certbot /var/log/white-proxy-certbot
|
|
if [ ! -d /etc/white-proxy-letsencrypt/accounts ]; then
|
|
cp -a /etc/letsencrypt/accounts /etc/white-proxy-letsencrypt/accounts
|
|
fi
|
|
exec certbot certonly --non-interactive --manual --preferred-challenges dns \
|
|
--manual-auth-hook 'python3 /opt/gateway-admin-proxy/provision/legacy-dns-hook.py auth' \
|
|
--manual-cleanup-hook 'python3 /opt/gateway-admin-proxy/provision/legacy-dns-hook.py cleanup' \
|
|
--config-dir /etc/white-proxy-letsencrypt \
|
|
--work-dir /var/lib/white-proxy-certbot \
|
|
--logs-dir /var/log/white-proxy-certbot \
|
|
--no-directory-hooks --cert-name tomshell.com.de \
|
|
-d tomshell.com.de -d '*.tomshell.com.de'
|