Adding experimental letsencrypt support
This commit is contained in:
14
scripts/letsencrypt-setup
Executable file
14
scripts/letsencrypt-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Lets Encrypt
|
||||
if [ -z "$WEBROOT" ] || [ -z "$GIT_EMAIL" ] || [ -z "$DOMAIN" ]; then
|
||||
echo "You need the \$WEBROOT, \$GIT_EMAIL and the \$DOMAIN Variables"
|
||||
else
|
||||
certbot certonly --webroot -w $WEBROOT -d $DOMAIN --email $GIT_EMAIL --agree-tos
|
||||
ln -s /etc/nginx/sites-available/default-ssl.conf /etc/nginx/sites-enabled/
|
||||
|
||||
sed -i "s/##DOMAIN##/${DOMAIN}/g" /etc/nginx/sites-enabled/default-ssl.conf
|
||||
|
||||
supervisorctl restart nginx
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user