From: Christian Heller Date: Wed, 28 Nov 2018 00:35:20 +0000 (+0100) Subject: WIP. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bitem_name%7D%7D?a=commitdiff_plain;h=93bc7a4f2c50f2fba16bdf7e07068da3c0200c52;p=config WIP. --- diff --git a/all_new_2018/letsencrypt_local_set.sh b/all_new_2018/letsencrypt_local_set.sh index d4ca0d1..7030b57 100755 --- a/all_new_2018/letsencrypt_local_set.sh +++ b/all_new_2018/letsencrypt_local_set.sh @@ -2,12 +2,11 @@ set -e # Ensure we have a mail address as argument. -if [ $# -lt 2 ]; then - echo "Need target domain and mail address as argument." +if [ $# -lt 1 ]; then + echo "Need mail address as argument." false fi domain="$1" -mail_address="$2" # If port 80 blocked by iptables, open it. set +e @@ -19,7 +18,7 @@ if [ "${open_iptables}" -eq "1" ]; then fi # Create new certificate and copy it to /etc/letsencrypt. -certbot certonly --standalone --agree-tos -m "${mail_address}" -d "${domain}" +certbot certonly --standalone --agree-tos -m "${mail_address}" -d "$(hostname -f)" # Remove iptables rule to open port 80 if we added it. if [ "${open_iptables}" -eq "1" ]; then