]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
use "-s" to detect content in temporary curl error logfile
authorLukas Schauer <lukas@schauer.so>
Sun, 6 Dec 2015 14:01:34 +0000 (15:01 +0100)
committerLukas Schauer <lukas@schauer.so>
Sun, 6 Dec 2015 14:01:34 +0000 (15:01 +0100)
letsencrypt.sh

index ec5467f1b1450fb63ae8499c7a8fa1a2ac927883..212ed7e25c026976be368181b2af60a8b7692881 100755 (executable)
@@ -55,7 +55,7 @@ _request() {
     curl -sSf "${2}" -d "${3}" 2> "${temperr}"
   fi
 
-  if [[ ! -z "$(<${temperr})" ]]; then
+  if [[ -s "${temperr}" ]]; then
     echo "  + ERROR: An error occured while sending ${1}-request to ${2} ($(<"${temperr}"))" >&2
     rm -f "${temperr}"
     exit 1