Skip to content

Instantly share code, notes, and snippets.

@Cougar
Created October 14, 2020 13:38
Show Gist options
  • Save Cougar/62a0ec42201d8ed6e57621664046d2cf to your computer and use it in GitHub Desktop.
Save Cougar/62a0ec42201d8ed6e57621664046d2cf to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ ! "$1" ]; then
echo "usage $0 domainlist" >&2
exit 1
fi
mkdir -p $HOME/docker-volumes/letsencrypt
docker run \
-ti \
--user $(id --user):$(id --group) \
-v $HOME/docker-volumes/letsencrypt:/etc/letsencrypt \
--network host \
certbot/certbot \
certonly \
--manual \
--config-dir=/etc/letsencrypt/config \
--work-dir=/etc/letsencrypt/work \
--logs-dir=/etc/letsencrypt/logs \
--manual-public-ip-logging-ok \
--agree-tos \
--preferred-challenges dns \
-d "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment