Unverified Commit 7573e560 authored by Daniel Watrous's avatar Daniel Watrous Committed by GitHub
Browse files

Add conditional check to ensure path is provided

parent c8bc155c
...@@ -23,7 +23,13 @@ haproxy_deploy() { ...@@ -23,7 +23,13 @@ haproxy_deploy() {
# combine the key and fullchain into a single pem and install # combine the key and fullchain into a single pem and install
_savedomainconf DEPLOY_HAPROXY_PEM_PATH "$DEPLOY_HAPROXY_PEM_PATH" _savedomainconf DEPLOY_HAPROXY_PEM_PATH "$DEPLOY_HAPROXY_PEM_PATH"
_pem_full_path="$DEPLOY_HAPROXY_PEM_PATH/$_cdomain.pem" _pem_path="${DEPLOY_HAPROXY_PEM_PATH}"
if [ -z "$_pem_path" ]; then
_err "Path to save PEM file not found. Please define DEPLOY_HAPROXY_PEM_PATH."
return 1
fi
_pem_full_path="$_pem_path/$_cdomain.pem"
_info "Full path to PEM $_pem_full_path" _info "Full path to PEM $_pem_full_path"
cat "$_cfullchain" "$_ckey" > "$_pem_full_path" cat "$_cfullchain" "$_ckey" > "$_pem_full_path"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment