#!/bin/bash -x for URL in $BASE_URL $OTHER_URLS; do certbot certonly -n \ --webroot \ -w /var/www/certbot/ \ --agree-tos \ --no-eff-email \ -m "$EMAIL" \ -d "$URL" done for f in *; do envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f" done printf "POST /containers/nginx/kill?signal=SIGHUP HTTP/1.0\r\n\n" \ | nc -U /var/run/docker.sock