|
|
|
@ -47,6 +47,7 @@ localcopy_deploy() { |
|
|
|
_err "Failed to copy certificate, aborting." |
|
|
|
return 1; |
|
|
|
fi; |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CERTIFICATE "$DEPLOY_LOCALCOPY_CERTIFICATE" |
|
|
|
fi; |
|
|
|
|
|
|
|
if [ "$DEPLOY_LOCALCOPY_CERTKEY" ]; then |
|
|
|
@ -57,7 +58,7 @@ localcopy_deploy() { |
|
|
|
_err "Failed to copy certificate key, aborting." |
|
|
|
return 1; |
|
|
|
fi; |
|
|
|
|
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CERTKEY "$DEPLOY_LOCALCOPY_CERTKEY" |
|
|
|
fi; |
|
|
|
|
|
|
|
if [ "$DEPLOY_LOCALCOPY_FULLCHAIN" ]; then |
|
|
|
@ -68,7 +69,7 @@ localcopy_deploy() { |
|
|
|
_err "Failed to copy fullchain, aborting." |
|
|
|
return 1; |
|
|
|
fi; |
|
|
|
|
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_FULLCHAIN "$DEPLOY_LOCALCOPY_FULLCHAIN" |
|
|
|
fi; |
|
|
|
|
|
|
|
if [ "$DEPLOY_LOCALCOPY_CA" ]; then |
|
|
|
@ -79,23 +80,25 @@ localcopy_deploy() { |
|
|
|
_err "Failed to copy CA, aborting." |
|
|
|
return 1; |
|
|
|
fi; |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CA "$DEPLOY_LOCALCOPY_CA" |
|
|
|
fi; |
|
|
|
|
|
|
|
_reload=$DEPLOY_LOCALCOPY_RELOADCMD |
|
|
|
_debug "Running reloadcmd $_reload" |
|
|
|
|
|
|
|
if [ -z "$_reload" ]; then |
|
|
|
_info "Reloadcmd not provided, skipping." |
|
|
|
else |
|
|
|
_info "Reloading" |
|
|
|
if eval $_reload; then |
|
|
|
_info "Reload successful." |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_RELOADCMD "$DEPLOY_LOCALCOPY_RELOADCMD" "base64" |
|
|
|
else |
|
|
|
_err "Reload failed." |
|
|
|
fi; |
|
|
|
fi; |
|
|
|
|
|
|
|
# Save configuration |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CERTIFICATE "$DEPLOY_LOCALCOPY_CERTIFICATE" |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CERTKEY "$DEPLOY_LOCALCOPY_CERTKEY" |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_FULLCHAIN "$DEPLOY_LOCALCOPY_FULLCHAIN" |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_CA "$DEPLOY_LOCALCOPY_CA" |
|
|
|
_savedeployconf DEPLOY_LOCALCOPY_RELOADCMD "$DEPLOY_LOCALCOPY_RELOADCMD" "base64" |
|
|
|
|
|
|
|
_info "$(__green ""localcopy" deploy success")" |
|
|
|
_info "$(__green "'localcopy' deploy success")" |
|
|
|
return 0 |
|
|
|
|
|
|
|
} |
|
|
|
|