Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
a25a4b5d
Commit
a25a4b5d
authored
Aug 22, 2017
by
neil
Committed by
GitHub
Aug 22, 2017
Browse files
Merge pull request #986 from Neilpang/dev
Dev
parents
2a2f7724
309bec47
Changes
3
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
a25a4b5d
...
@@ -100,6 +100,10 @@ _PREPARE_LINK="https://github.com/Neilpang/acme.sh/wiki/Install-preparations"
...
@@ -100,6 +100,10 @@ _PREPARE_LINK="https://github.com/Neilpang/acme.sh/wiki/Install-preparations"
_STATELESS_WIKI
=
"https://github.com/Neilpang/acme.sh/wiki/Stateless-Mode"
_STATELESS_WIKI
=
"https://github.com/Neilpang/acme.sh/wiki/Stateless-Mode"
_DNS_MANUAL_ERR
=
"The dns manual mode can not renew automatically, you must issue it again manually. You'd better use the other modes instead."
_DNS_MANUAL_WARN
=
"It seems that you are using dns manual mode. please take care:
$_DNS_MANUAL_ERR
"
__INTERACTIVE
=
""
__INTERACTIVE
=
""
if
[
-t
1
]
;
then
if
[
-t
1
]
;
then
__INTERACTIVE
=
"1"
__INTERACTIVE
=
"1"
...
@@ -3046,6 +3050,10 @@ _on_issue_err() {
...
@@ -3046,6 +3050,10 @@ _on_issue_err() {
)
)
fi
fi
if
[
"
$IS_RENEW
"
=
"1"
]
&&
_hasfield
"
$Le_Webroot
"
"dns"
;
then
_err
"
$_DNS_MANUAL_ERR
"
fi
if
[
"
$DEBUG
"
]
&&
[
"
$DEBUG
"
-gt
"0"
]
;
then
if
[
"
$DEBUG
"
]
&&
[
"
$DEBUG
"
-gt
"0"
]
;
then
_debug
"
$(
_dlg_versions
)
"
_debug
"
$(
_dlg_versions
)
"
fi
fi
...
@@ -3078,6 +3086,10 @@ _on_issue_success() {
...
@@ -3078,6 +3086,10 @@ _on_issue_success() {
fi
fi
fi
fi
if
_hasfield
"
$Le_Webroot
"
"dns"
;
then
_err
"
$_DNS_MANUAL_WARN
"
fi
}
}
updateaccount
()
{
updateaccount
()
{
...
...
deploy/cpanel.sh
deleted
100644 → 0
View file @
2a2f7724
#!/usr/bin/env sh
#Here is the script to deploy the cert to your cpanel account by the cpanel APIs.
#returns 0 means success, otherwise error.
#export DEPLOY_CPANEL_USER=myusername
#export DEPLOY_CPANEL_PASSWORD=PASSWORD
######## Public functions #####################
#domain keyfile certfile cafile fullchain
cpanel_deploy
()
{
_cdomain
=
"
$1
"
_ckey
=
"
$2
"
_ccert
=
"
$3
"
_cca
=
"
$4
"
_cfullchain
=
"
$5
"
_debug _cdomain
"
$_cdomain
"
_debug _ckey
"
$_ckey
"
_debug _ccert
"
$_ccert
"
_debug _cca
"
$_cca
"
_debug _cfullchain
"
$_cfullchain
"
_err
"Not implemented yet"
return
1
}
deploy/cpanel_uapi.sh
0 → 100644
View file @
a25a4b5d
#!/usr/bin/env sh
# Here is the script to deploy the cert to your cpanel using the cpanel API.
# Uses command line uapi. --user option is needed only if run as root.
# Returns 0 when success.
# Written by Santeri Kannisto <santeri.kannisto@2globalnomads.info>
# Public domain, 2017
#export DEPLOY_CPANEL_USER=myusername
######## Public functions #####################
#domain keyfile certfile cafile fullchain
cpanel_uapi
()
{
_cdomain
=
"
$1
"
_ckey
=
"
$2
"
_ccert
=
"
$3
"
_cca
=
"
$4
"
_cfullchain
=
"
$5
"
_debug _cdomain
"
$_cdomain
"
_debug _ckey
"
$_ckey
"
_debug _ccert
"
$_ccert
"
_debug _cca
"
$_cca
"
_debug _cfullchain
"
$_cfullchain
"
# read cert and key files and urlencode both
_certstr
=
$(
cat
"
$_ccert
"
)
_keystr
=
$(
cat
"
$_ckey
"
)
_cert
=
$(
php
-r
"echo urlencode(
\"
$_certstr
\"
);"
)
_key
=
$(
php
-r
"echo urlencode(
\"
$_keystr
\"
);"
)
_debug _cert
"
$_cert
"
_debug _key
"
$_key
"
if
[
"
$(
id
-u
)
"
=
0
]
;
then
_response
=
$(
uapi
--user
=
"
$DEPLOY_CPANEL_USER
"
SSL install_ssl
domain
=
"
$_cdomain
"
cert
=
"
$_cert
"
key
=
"
$_key
"
)
else
_response
=
$(
uapi SSL install_ssl
domain
=
"
$_cdomain
"
cert
=
"
$_cert
"
key
=
"
$_key
"
)
fi
if
[
$?
-ne
0
]
;
then
_err
"Error in deploying certificate:"
_err
"
$_response
"
return
1
fi
_debug response
"
$_response
"
_info
"Certificate successfully deployed"
return
0
}
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