Browse Source

Removing double spaces between code and comments

pull/411/merge^2
hyper 8 years ago
committed by sjau
parent
commit
762712b7fe
  1. 10
      dnsapi/dns_ispconfig.sh

10
dnsapi/dns_ispconfig.sh

@ -4,7 +4,7 @@
ISPC_User="" ISPC_User=""
ISPC_Password="" 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 ##################### ######## Public functions #####################
@ -56,8 +56,8 @@ _ISPC_getZoneInfo () {
zoneEnd=false zoneEnd=false
curZone="${fulldomain}" curZone="${fulldomain}"
while [ ${zoneEnd} = false ]; do 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") curResult=$(curl -k --data "${curData}" "${ISPC_Api}?dns_zone_get")
if _contains "${curResult}" '"id":"'; then if _contains "${curResult}" '"id":"'; then
zoneFound=true zoneFound=true
@ -106,7 +106,7 @@ _ISPC_addTxt () {
case ${record_id} in case ${record_id} in
''|*[!0-9]*) _err "Record ID is not numeric. Aborting" ;; ''|*[!0-9]*) _err "Record ID is not numeric. Aborting" ;;
*) _info "Successfully retrieved Record ID"; *) _info "Successfully retrieved Record ID";
record_data="$record_data $record_id" ;; # Make space seperated string of record IDs for later removal.
record_data="$record_data $record_id" ;; # Make space seperated string of record IDs for later removal.
esac esac
} }
@ -118,7 +118,7 @@ _ISPC_rmTxt () {
if _contains "${curResult}" '"code":"ok"'; then if _contains "${curResult}" '"code":"ok"'; then
_info "Successfully removed ACME challenge txt record." _info "Successfully removed ACME challenge txt record."
else 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 fi
done done
} }
Loading…
Cancel
Save