X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;ds=sidebyside;f=all_new_2018%2Fletsencrypt_local_set.sh;h=5fdf7036b5596c5267f653094826e2e6cb028357;hb=06196e55c1d465d38ab97cdca1ad896e686b682b;hp=a7ec6e50451550af30a90591fdd7ff31128eaf2f;hpb=f2a01cfd1fb4fc2510ce1df00def189a10be42d7;p=config diff --git a/all_new_2018/letsencrypt_local_set.sh b/all_new_2018/letsencrypt_local_set.sh index a7ec6e5..5fdf703 100755 --- a/all_new_2018/letsencrypt_local_set.sh +++ b/all_new_2018/letsencrypt_local_set.sh @@ -8,6 +8,9 @@ if [ $# -lt 1 ]; then fi mail_address="$1" +# We need certbot to get LetsEncrypt certificates. +apt install -y certbot + # If port 80 blocked by iptables, open it. set +e iptables -C INPUT -p tcp --dport 80 -j ACCEPT @@ -18,7 +21,7 @@ if [ "${open_iptables}" -eq "1" ]; then fi # Create new certificate and copy it to /etc/letsencrypt. -certbot certonly --standalone --agree-tos -m "${mail}" -d "$(hostname -f)" +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