]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
style: double quote to prevent globbing and word splitting
authorBenjamin Dos Santos <benjamin.dossantos@gmail.com>
Sun, 6 Dec 2015 00:33:40 +0000 (01:33 +0100)
committerLukas Schauer <lukas@schauer.so>
Sun, 6 Dec 2015 02:01:34 +0000 (03:01 +0100)
https://github.com/koalaman/shellcheck/wiki/Sc2086

letsencrypt.sh

index 0c1d544759856bc7b89f3bd13f59e7a13546764e..ec5467f1b1450fb63ae8499c7a8fa1a2ac927883 100755 (executable)
@@ -48,11 +48,11 @@ hex2bin() {
 _request() {
   temperr="$(mktemp)"
   if [[ "${1}" = "head" ]]; then
-    curl -sSf -I "${2}" 2>${temperr}
+    curl -sSf -I "${2}" 2> "${temperr}"
   elif [[ "${1}" = "get" ]]; then
-    curl -sSf "${2}" 2>${temperr}
+    curl -sSf "${2}" 2> "${temperr}"
   elif [[ "${1}" = "post" ]]; then
-    curl -sSf "${2}" -d "${3}" 2>${temperr}
+    curl -sSf "${2}" -d "${3}" 2> "${temperr}"
   fi
 
   if [[ ! -z "$(<${temperr})" ]]; then
@@ -181,6 +181,6 @@ if [[ "${register}" = "1" ]]; then
 fi
 
 # Generate certificates for all domains found in domain.txt (TODO: check if certificate already exists and is about to expire)
-<domains.txt sed 's/^\s*//g;s/\s*$//g' | grep -v '^#' | grep -v '^$' | while read line; do
+<domains.txt sed 's/^\s*//g;s/\s*$//g' | grep -v '^#' | grep -v '^$' | while read -r line; do
   sign_domain $line
 done