From eb7045d14eb6573d3aa37193dcec1c48ca588455 Mon Sep 17 00:00:00 2001 From: Dennis U Date: Thu, 14 Mar 2019 12:54:47 +0100 Subject: [PATCH] Added more API endpoints and updated script help (#5) * Added more API endpoints The API endpoint with the nearest physical location can be used. * Updated script help for private clouds Output displays now correct key privileges if created with generate_key function. --- check_ovh_service_expiry.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/check_ovh_service_expiry.sh b/check_ovh_service_expiry.sh index ef85382..6aad88e 100755 --- a/check_ovh_service_expiry.sh +++ b/check_ovh_service_expiry.sh @@ -59,6 +59,7 @@ Allow access to: /dedicated/server/* /domain/* /vps/* +/dedicatedCloud/* If you get with enabled debug mode output like this: {"errorCode":"INVALID_CREDENTIAL","httpCode":"403 Forbidden","message":"This credential is not valid"} @@ -274,11 +275,23 @@ while getopts “:hdgW:C:P:t:k:s:c:p:” OPTION; do C) crit=$OPTARG ;; P) case $OPTARG in - 'ovh') api="https://eu.api.ovh.com/1.0" + # You may change the endpoint to your nearest physical location + 'ovh') # Europe + api="https://eu.api.ovh.com/1.0" + # USA + # api="https://api.us.ovhcloud.com/1.0" + # Canada + # api="https://ca.api.ovh.com/1.0" ;; - 'sys') api="https://eu.api.soyoustart.com/1.0" + 'sys') # Europe + api="https://eu.api.soyoustart.com/1.0" + # Canada + # api="https://ca.api.soyoustart.com/1.0" ;; - 'ksf') api="https://eu.api.kimsufi.com/1.0" + 'ksf') # Europe + api="https://eu.api.kimsufi.com/1.0" + # Canada + # api="https://ca.api.kimsufi.com/1.0" ;; *) >&2 echo "Unknown argument $OPTARG in Option $OPTION. Execute script with -h option to get help."; exit 3