Skip to content

Instantly share code, notes, and snippets.

@bionade24
Created April 28, 2020 18:06
Show Gist options
  • Save bionade24/2174ed83bbeb9a1e0d2b6a1f4d0b7e4d to your computer and use it in GitHub Desktop.
Save bionade24/2174ed83bbeb9a1e0d2b6a1f4d0b7e4d to your computer and use it in GitHub Desktop.
acme.sh Auto issue configuration
#/bin/sh
DOMAIN=$1
echo $DOMAIN
if ! [ -d /etc/nginx/certs/$DOMAIN ]; then
echo "$DOMAIN folder gets created"
mkdir /etc/nginx/certs/$DOMAIN;
fi
~/.local/bin/acme.sh --force --issue -d $DOMAIN --keylength 4096 -w /var/www/letsencrypt --key-file /etc/nginx/certs/$DOMAIN/key.pem --ca-file /etc/nginx/certs/$DOMAIN/ca.pem --cert-file /etc/nginx/certs/$DOMAIN/cert.pem --fullchain-file /etc/nginx/certs/$DOMAIN/fullchain.pem --reloadcmd "sudo nginx -s reload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment