From caeb2301f5d53c5bfa01bb80888c3e6214c31a6a Mon Sep 17 00:00:00 2001 From: hyper Date: Mon, 21 Nov 2016 11:32:30 +0100 Subject: [PATCH] Put all the ISPC functions into one check --- dnsapi/dns_ispconfig.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/dnsapi/dns_ispconfig.sh b/dnsapi/dns_ispconfig.sh index 30085cae..a012d4c7 100755 --- a/dnsapi/dns_ispconfig.sh +++ b/dnsapi/dns_ispconfig.sh @@ -15,28 +15,13 @@ dns_ispconfig_add() { fulldomain="${1}" txtvalue="${2}" - _ISPC_login - if [ $? -eq 0 ]; then - _ISPC_getZoneInfo - fi - if [ $? -eq 0 ]; then - _ISPC_addTxt - fi - if [ $? -ne 0 ]; then - return 1 - fi + _ISPC_login && _ISPC_getZoneInfo && _ISPC_addTxt || return 1 } #Usage: dns_myapi_rm _acme-challenge.www.domain.com dns_ispconfig_rm() { fulldomain="${1}" - _ISPC_login - if [ $? -eq 0 ]; then - _ISPC_rmTxt - fi - if [ $? -ne 0 ]; then - return 1 - fi + _ISPC_login && _ISPC_rmTxt || return 1 } #################### Private functions bellow ##################################