From b5d59f85e9dd33dfa4a9e8e0f70ebd9f3fe46f69 Mon Sep 17 00:00:00 2001 From: Ahmed Kajee <45117245+aikajee@users.noreply.github.com> Date: Sat, 19 Oct 2019 10:37:29 -0400 Subject: [PATCH] Update sed entries in debian/letsencrypt.sh file (#272) The sed entries to update the config file was creating the following issues: 1) It was creating duplicate config files, the second has a trailing space. 2) The email variable was not passed to the config file. 3) removing the leading # from WELLKNOWN does not require the file path as it does not change. This shortened command may eliminate the creating of two config files. --- debian/resources/letsencrypt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/resources/letsencrypt.sh b/debian/resources/letsencrypt.sh index 915e7d1..844a3ac 100755 --- a/debian/resources/letsencrypt.sh +++ b/debian/resources/letsencrypt.sh @@ -58,8 +58,8 @@ cp docs/examples/config /etc/dehydrated #update the dehydrated config #sed "s#CONTACT_EMAIL=#CONTACT_EMAIL=$email_address" -i /etc/dehydrated/config -sed -i' ' -e s:'#CONTACT_EMAIL=":CONTACT_EMAIL=$email_address:' /etc/dehydrated/config -sed -i' ' -e s:'#WELLKNOWN="/var/www/dehydrated":WELLKNOWN="/var/www/dehydrated":' /etc/dehydrated/config +sed -i 's/#CONTACT_EMAIL=/CONTACT_EMAIL="'"$email_address"'"/g' /etc/dehydrated/config +sed -i 's/#WELLKNOWN=/WELLKNOWN=/g' /etc/dehydrated/config #accept the terms dehydrated --register --accept-terms --config /etc/dehydrated/config