Browse Source

Update localhost.sh

pull/4224/head
Github-Citizen 2 years ago
committed by GitHub
parent
commit
862b5982e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      deploy/localhost.sh

14
deploy/localhost.sh

@ -2,7 +2,7 @@
# #
# Deploy cert to localhost similar to certbot behavior # Deploy cert to localhost similar to certbot behavior
# #
# export DEPLOY_LOCALHOST_PATH="/path/to/certs"
# export DEPLOY_LOCALHOST_ROOT_PATH="/path/to/certs"
# #
# Deploys as: # Deploys as:
# /path/to/certs/domain.tld/privkey.pem # /path/to/certs/domain.tld/privkey.pem
@ -25,27 +25,27 @@ localhost_deploy() {
_debug _cca "$_cca" _debug _cca "$_cca"
_debug _cfullchain "$_cfullchain" _debug _cfullchain "$_cfullchain"
_getdeployconf DEPLOY_LOCALHOST_PATH
_getdeployconf DEPLOY_LOCALHOST_ROOT_PATH
_debug DEPLOY_LOCALHOST_PATH "$DEPLOY_LOCALHOST_PATH"
_debug DEPLOY_LOCALHOST_ROOT_PATH "$DEPLOY_LOCALHOST_ROOT_PATH"
if [ -z "$_cdomain" ]; then if [ -z "$_cdomain" ]; then
_err "Domain not defined" _err "Domain not defined"
return 1 return 1
fi fi
if [ -z "$DEPLOY_LOCALHOST_PATH" ]; then
_err "DEPLOY_LOCALHOST_PATH not defined"
if [ -z "$DEPLOY_LOCALHOST_ROOT_PATH" ]; then
_err "DEPLOY_LOCALHOST_ROOT_PATH not defined"
return 1 return 1
fi fi
_ssl_path="$DEPLOY_LOCALHOST_PATH"
_ssl_path="$DEPLOY_LOCALHOST_ROOT_PATH"
if [ ! -d "$_ssl_path" ]; then if [ ! -d "$_ssl_path" ]; then
_err "Path not found: $_ssl_path" _err "Path not found: $_ssl_path"
return 1 return 1
fi fi
_savedeployconf DEPLOY_LOCALHOST_PATH "$DEPLOY_LOCALHOST_PATH"
_savedeployconf DEPLOY_LOCALHOST_ROOT_PATH "$DEPLOY_LOCALHOST_ROOT_PATH"
_ssl_path="$_ssl_path/$_cdomain" _ssl_path="$_ssl_path/$_cdomain"
mkdir -p "$_ssl_path" mkdir -p "$_ssl_path"

Loading…
Cancel
Save