_err "No host, user and pass found.. If this is the first time deploying please set PANOS_HOST, PANOS_USER and PANOS_PASS in environment variables. Delete them after you have succesfully deployed certs."
return1
else
_debug "ok"
_debug "Using saved env variables."
fi
else
_debug "Saving environment variables"
_debug "Detected ENV variables to be saved to the deploy conf."
# Encrypt and save user
_saveaccountconf_mutable PANOS_USER "$PANOS_USER"
_saveaccountconf_mutable PANOS_PASS "$PANOS_PASS"
_savedeployconf PANOS_USER "$PANOS_USER"1
_savedeployconf PANOS_PASS "$PANOS_PASS"1
_savedeployconf PANOS_HOST "$PANOS_HOST"1
_panos_user="$PANOS_USER"
_panos_pass="$PANOS_PASS"
_panos_host="$PANOS_HOST"
fi
_debug "Let's use username and pass to generate token."