From 762712b7fe3df68b1ff6046d41019c9673db7d05 Mon Sep 17 00:00:00 2001 From: hyper Date: Mon, 21 Nov 2016 09:59:01 +0100 Subject: [PATCH] Removing double spaces between code and comments --- dnsapi/dns_ispconfig.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dnsapi/dns_ispconfig.sh b/dnsapi/dns_ispconfig.sh index 2f4605bf..850bc5ff 100755 --- a/dnsapi/dns_ispconfig.sh +++ b/dnsapi/dns_ispconfig.sh @@ -4,7 +4,7 @@ ISPC_User="" ISPC_Password="" -ISPC_Api="https://ispc.domain.tld:8080/remote/json.php" # Provide proper URL and port for your ISPC Installation +ISPC_Api="https://ispc.domain.tld:8080/remote/json.php" # Provide proper URL and port for your ISPC Installation ######## Public functions ##################### @@ -42,7 +42,7 @@ _ISPC_login() { _info "Getting Session ID" curData="{\"username\":\"${ISPC_User}\",\"password\":\"${ISPC_Password}\",\"client_login\":false}" curResult=$(curl -k --data "${curData}" "${ISPC_Api}?login") - if _contains "${curResult}" '"code":"ok"'; then + if _contains "${curResult}" '"code":"ok"'; then sessionID=$(echo "${curResult}" | _egrep_o "response.*" | cut -d ':' -f 2) sessionID=${sessionID:1:-2} _info "Successfully retrieved Session ID." @@ -56,8 +56,8 @@ _ISPC_getZoneInfo () { zoneEnd=false curZone="${fulldomain}" while [ ${zoneEnd} = false ]; do - curZone="${curZone#*.}" # we can strip the first part of the fulldomain, since it's just the _acme-challenge string - curData="{\"session_id\":\"${sessionID}\",\"primary_id\":[{\"origin\":\"${curZone}.\"}]}" # suffix . needed for zone -> domain.tld. + curZone="${curZone#*.}" # we can strip the first part of the fulldomain, since it's just the _acme-challenge string + curData="{\"session_id\":\"${sessionID}\",\"primary_id\":[{\"origin\":\"${curZone}.\"}]}" # suffix . needed for zone -> domain.tld. curResult=$(curl -k --data "${curData}" "${ISPC_Api}?dns_zone_get") if _contains "${curResult}" '"id":"'; then zoneFound=true @@ -105,8 +105,8 @@ _ISPC_addTxt () { record_id=${record_id:1:-2} case ${record_id} in ''|*[!0-9]*) _err "Record ID is not numeric. Aborting" ;; - *) _info "Successfully retrieved Record ID"; - record_data="$record_data $record_id" ;; # Make space seperated string of record IDs for later removal. + *) _info "Successfully retrieved Record ID"; + record_data="$record_data $record_id" ;; # Make space seperated string of record IDs for later removal. esac } @@ -118,7 +118,7 @@ _ISPC_rmTxt () { if _contains "${curResult}" '"code":"ok"'; then _info "Successfully removed ACME challenge txt record." else - _debug "Couldn't remove ACME challenge txt record"; # Setting it to debug only because there's no harm if the txt remains + _debug "Couldn't remove ACME challenge txt record"; # Setting it to debug only because there's no harm if the txt remains fi done }