Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
e9e99954
"components/vscode:/vscode.git/clone" did not exist on "fbef7feae1eb254dd056d7d683fef17fa30ca102"
Unverified
Commit
e9e99954
authored
May 04, 2018
by
Daniel Watrous
Committed by
GitHub
May 04, 2018
Browse files
add reload
parent
5f593994
Changes
1
Show whitespace changes
Inline
Side-by-side
deploy/haproxy.sh
View file @
e9e99954
...
@@ -20,9 +20,18 @@ haproxy_deploy() {
...
@@ -20,9 +20,18 @@ haproxy_deploy() {
_debug _cca
"
$_cca
"
_debug _cca
"
$_cca
"
_debug _cfullchain
"
$_cfullchain
"
_debug _cfullchain
"
$_cfullchain
"
# combine the key and fullchain into a single pem and install
# handle reload preference
DEFAULT_HAPROXY_RELOAD
=
"/usr/sbin/service haproxy restart"
if
[[
-z
"
${
DEPLOY_HAPROXY_RELOAD
}
"
]]
;
then
_reload
=
"
${
DEFAULT_HAPROXY_RELOAD
}
"
_cleardomainconf DEPLOY_HAPROXY_RELOAD
else
_reload
=
"
${
DEPLOY_HAPROXY_RELOAD
}
"
_savedomainconf DEPLOY_HAPROXY_RELOAD
"
$DEPLOY_HAPROXY_RELOAD
"
fi
_savedomainconf DEPLOY_HAPROXY_PEM_PATH
"
$DEPLOY_HAPROXY_PEM_PATH
"
_savedomainconf DEPLOY_HAPROXY_PEM_PATH
"
$DEPLOY_HAPROXY_PEM_PATH
"
# work out the path where the PEM file should go
_pem_path
=
"
${
DEPLOY_HAPROXY_PEM_PATH
}
"
_pem_path
=
"
${
DEPLOY_HAPROXY_PEM_PATH
}
"
if
[
-z
"
$_pem_path
"
]
;
then
if
[
-z
"
$_pem_path
"
]
;
then
_err
"Path to save PEM file not found. Please define DEPLOY_HAPROXY_PEM_PATH."
_err
"Path to save PEM file not found. Please define DEPLOY_HAPROXY_PEM_PATH."
...
@@ -31,10 +40,19 @@ haproxy_deploy() {
...
@@ -31,10 +40,19 @@ haproxy_deploy() {
_pem_full_path
=
"
$_pem_path
/
$_cdomain
.pem"
_pem_full_path
=
"
$_pem_path
/
$_cdomain
.pem"
_info
"Full path to PEM
$_pem_full_path
"
_info
"Full path to PEM
$_pem_full_path
"
# combine the key and fullchain into a single pem and install
cat
"
$_cfullchain
"
"
$_ckey
"
>
"
$_pem_full_path
"
cat
"
$_cfullchain
"
"
$_ckey
"
>
"
$_pem_full_path
"
chmod
600
"
$_pem_full_path
"
chmod
600
"
$_pem_full_path
"
_info
"Certificate successfully deployed"
_info
"Certificate successfully deployed"
# restart HAProxy
_info
"Run reload:
$_reload
"
if
eval
"
$_reload
"
;
then
_info
"Reload success!"
return
0
return
0
else
_err
"Reload error"
return
1
fi
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment