Last active
August 19, 2019 22:51
-
-
Save lsde/3b191f3fec40242ef877bb458c300325 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# Assuming following config in HAproxy: | |
# | |
# acl letsencrypt-acl path_beg /.well-known/acme-challenge/ | |
# use_backend letsencrypt-backend if letsencrypt-acl | |
# backend letsencrypt-backend | |
# server letsencrypt 127.0.0.1:8888 | |
DEPLOY_HAPROXY_RELOAD="/etc/init.d/haproxy reload" | |
for DOMAIN in $@; do | |
DOMAINS="$DOMAINS -d $DOMAIN" | |
done | |
acme.sh --issue --standalone --httpport 8888 --local-address 127.0.0.1 --listen-v4 $DOMAINS | |
acme.sh --deploy --deploy-hook haproxy -d $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment