18 lines
807 B
Bash
18 lines
807 B
Bash
#!/bin/sh
|
|
# Reuse the already accepted gateway LE account without running global hooks.
|
|
set -eu
|
|
umask 077
|
|
test "$(id -u)" = 0
|
|
test -d /etc/dpl-letsencrypt/accounts/acme-v02.api.letsencrypt.org
|
|
install -d -m 700 /etc/gateway-admin-letsencrypt /var/lib/gateway-admin-proxy/certbot /var/log/gateway-admin-certbot
|
|
if [ ! -d /etc/gateway-admin-letsencrypt/accounts ]; then
|
|
cp -a /etc/dpl-letsencrypt/accounts /etc/gateway-admin-letsencrypt/accounts
|
|
fi
|
|
exec certbot certonly --non-interactive --webroot \
|
|
--webroot-path /var/lib/gateway-admin-proxy/acme \
|
|
--config-dir /etc/gateway-admin-letsencrypt \
|
|
--work-dir /var/lib/gateway-admin-proxy/certbot \
|
|
--logs-dir /var/log/gateway-admin-certbot \
|
|
--no-directory-hooks --cert-name gateway-admin \
|
|
-d getway-fuc.gemcook.net -d getway-dpl.gemcook.net
|