_debug "Detected ENV variable PANOS_HOST. Saving to file."
@ -193,10 +193,13 @@ panos_deploy() {
# Check for valid variables
if[ -z "$_panos_host"];then
_err "No host found. Please enter a valid host as environment variable PANOS_HOST."
_err "No host found. If this is your first time deploying, please set PANOS_HOST in ENV variables. You can delete it after you have successfully deployed the certs."
return1
elif[ -z "$_panos_user"];then
_err "No user found. If this is your first time deploying, please set PANOS_USER in ENV variables. You can delete it after you have successfully deployed certs."
_err "No user and pass OR valid API key found.. If this is the first time deploying please set PANOS_USER and PANOS_PASS -- AND/OR -- PANOS_KEY in environment variables. Delete them after you have succesfully deployed certs."
_err "No pass OR valid API key found. If this is your first time deploying please set PANOS_PASS and/or PANOS_KEY in ENV variables. You can delete them after you have succesfully deployed certs."
return1
else
# Generate a new API key if no valid API key is found
@ -208,7 +211,7 @@ panos_deploy() {
# Confirm that a valid key was generated
if[ -z "$_panos_key"];then
_err "Unable to generate an API key. The user and pass may be invalid or not authorized to generate a new key. Please check the credentials and try again"
_err "Unable to generate an API key. The user and pass may be invalid or not authorized to generate a new key. Please check the PANOS_USER and PANOS_PASS credentials and try again"