From f81db21c29c15cf69951e65b590ce58f80cb22a6 Mon Sep 17 00:00:00 2001 From: You Ming Date: Mon, 29 May 2017 00:21:55 +0800 Subject: [PATCH] Fixed bugs. --- 0.14/letsencrypt-functions.sh | 4 ++-- 0.14/letsencrypt-obtain.sh | 2 +- 0.14/letsencrypt-renew.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/0.14/letsencrypt-functions.sh b/0.14/letsencrypt-functions.sh index b803044..eff8f84 100755 --- a/0.14/letsencrypt-functions.sh +++ b/0.14/letsencrypt-functions.sh @@ -45,8 +45,8 @@ function get_field continue fi - field=$(echo $line | awk -F= '{gsub(" |\t","",$1); print $1}') - value=$(echo $line | awk -F= '{gsub(" |\t","",$2); print $2}') + field=$(echo $line | awk -F= '{sub(/^[ |\t]*/,"",$1); sub(/[ |\t]*$/,"",$1); print $1}') + value=$(echo $line | awk -F= '{sub(/^[ |\t]*/,"",$2); sub(/[ |\t]*$/,"",$2); print $2}') if [ "$field" = "$3" ]; then echo $value diff --git a/0.14/letsencrypt-obtain.sh b/0.14/letsencrypt-obtain.sh index a6d9293..9fb2ec9 100755 --- a/0.14/letsencrypt-obtain.sh +++ b/0.14/letsencrypt-obtain.sh @@ -15,6 +15,6 @@ do continue fi - letsencrypt-auto certonly "$options" -n -q --agree-tos + letsencrypt-auto certonly -n -q --agree-tos "$options" done \ No newline at end of file diff --git a/0.14/letsencrypt-renew.sh b/0.14/letsencrypt-renew.sh index 07fb9ba..30b6c40 100755 --- a/0.14/letsencrypt-renew.sh +++ b/0.14/letsencrypt-renew.sh @@ -15,6 +15,6 @@ do continue fi - letsencrypt-auto certonly "$options" -n -q --agree-tos + letsencrypt-auto certonly -n -q --agree-tos "$options" done \ No newline at end of file