mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 20:42:50 +00:00
Added credentials check and saving
This commit is contained in:
parent
d9727fecf7
commit
cd2b47db0f
@ -15,7 +15,7 @@
|
|||||||
dns_ispconfig_add() {
|
dns_ispconfig_add() {
|
||||||
fulldomain="${1}"
|
fulldomain="${1}"
|
||||||
txtvalue="${2}"
|
txtvalue="${2}"
|
||||||
_ISPC_login && _ISPC_getZoneInfo && _ISPC_addTxt || return 1
|
_ISPC_Credentials && _ISPC_login && _ISPC_getZoneInfo && _ISPC_addTxt || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#Usage: dns_myapi_rm _acme-challenge.www.domain.com
|
#Usage: dns_myapi_rm _acme-challenge.www.domain.com
|
||||||
@ -26,6 +26,20 @@ dns_ispconfig_rm() {
|
|||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
|
|
||||||
|
_ISPC_credentials() {
|
||||||
|
if [ -z "$ISPC_User" ] || [ -z "$ISPC_Password" ] || [ -z "$ISPC_Api" ]; then
|
||||||
|
ISPC_User=""
|
||||||
|
ISPC_Password=""
|
||||||
|
ISPC_Api=""
|
||||||
|
_err "You haven't specified the ISPConfig Login data and the URL. Please try again."
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
_saveaccountconf ISPC_User "${ISPC_User}"
|
||||||
|
_saveaccountconf ISPC_Password "${ISPC_Password}"
|
||||||
|
_saveaccountconf ISPC_Api "${ISPC_Api}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_ISPC_login() {
|
_ISPC_login() {
|
||||||
_info "Getting Session ID"
|
_info "Getting Session ID"
|
||||||
curData="{\"username\":\"${ISPC_User}\",\"password\":\"${ISPC_Password}\",\"client_login\":false}"
|
curData="{\"username\":\"${ISPC_User}\",\"password\":\"${ISPC_Password}\",\"client_login\":false}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user