From 043dc48ca4a284fa2a1101c4ab058e7c769e1f30 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Fri, 31 Jan 2020 14:06:43 -0500 Subject: [PATCH] Add domain name param to LE script --- setup-scripts/letsencrypt-setup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup-scripts/letsencrypt-setup.sh b/setup-scripts/letsencrypt-setup.sh index 49487ae8..a6b8f030 100755 --- a/setup-scripts/letsencrypt-setup.sh +++ b/setup-scripts/letsencrypt-setup.sh @@ -1,5 +1,11 @@ #! /usr/bin/env bash set -e -sudo certbot --nginx -d siasky.net -d www.siasky.net +domain="$1" +if [[ -z $domain ]]; then + echo "Usage $0 DOMAIN_NAME" + exit 1 +fi + +sudo certbot --nginx -d "$domain" -d www."$domain" sudo certbot renew --dry-run