From 83c8248a072e68bbe95859a20f2ad899f7bfd613 Mon Sep 17 00:00:00 2001 From: David Mcanulty Date: Thu, 21 Apr 2016 10:16:37 -0700 Subject: [PATCH] sh/dash compatible if and changed debug message --- acme.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/acme.sh b/acme.sh index 0aa19b9b..c53c6fa0 100755 --- a/acme.sh +++ b/acme.sh @@ -491,13 +491,13 @@ _post() { CURL="$CURL --dump-header $HTTP_HEADER " if [ "$needbase64" ] ; then response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url | _base64)" - if [[ $? -gt 0 ]] ;then - _err "Curl failed with exit code $?, trying running script in DEBUG=2 mode" + if [ $? -gt 0 ] ;then + _err "Curl failed with exit code $?, trying running script with --debug 2" fi else response="$($CURL -A "User-Agent: $USER_AGENT" -X POST --data "$body" $url)" - if [[ $? -gt 0 ]] ;then - _err "Curl failed with exit code $?, trying running script in DEBUG=2 mode" + if [ $? -gt 0 ] ;then + _err "Curl failed with exit code $?, trying running script with --debug 2" fi fi else @@ -520,13 +520,13 @@ _get() { if _exists "curl" ; then if [ "$onlyheader" ] ; then $CURL -I -A "User-Agent: $USER_AGENT" $url - if [[ $? -gt 0 ]] ;then - _err "Curl failed with exit code $?, trying running script in DEBUG=2 mode" + if [ $? -gt 0 ] ;then + _err "Curl failed with exit code $?, trying running script with --debug 2" fi else $CURL -A "User-Agent: $USER_AGENT" $url - if [[ $? -gt 0 ]] ;then - _err "Curl failed with exit code $?, trying running script in DEBUG=2 mode" + if [ $? -gt 0 ] ;then + _err "Curl failed with exit code $?, trying running script with --debug 2" fi fi else