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
5b3f915d
Unverified
Commit
5b3f915d
authored
Jun 28, 2018
by
neil
Committed by
GitHub
Jun 28, 2018
Browse files
Merge pull request #1697 from santerikannisto/patch-6
Issue #1328 bug fix v3
parents
dedb56d2
d987d61e
Changes
1
Show whitespace changes
Inline
Side-by-side
deploy/cpanel_uapi.sh
View file @
5b3f915d
...
@@ -2,8 +2,12 @@
...
@@ -2,8 +2,12 @@
# Here is the script to deploy the cert to your cpanel using the cpanel API.
# 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.
# Uses command line uapi. --user option is needed only if run as root.
# Returns 0 when success.
# Returns 0 when success.
# Written by Santeri Kannisto <santeri.kannisto@2globalnomads.info>
#
# Public domain, 2017
# Please note that I am no longer using Github. If you want to report an issue
# or contact me, visit https://forum.webseodesigners.com/web-design-seo-and-hosting-f16/
#
# Written by Santeri Kannisto <santeri.kannisto@webseodesigners.com>
# Public domain, 2017-2018
#export DEPLOY_CPANEL_USER=myusername
#export DEPLOY_CPANEL_USER=myusername
...
@@ -28,15 +32,9 @@ cpanel_uapi_deploy() {
...
@@ -28,15 +32,9 @@ cpanel_uapi_deploy() {
_err
"The command uapi is not found."
_err
"The command uapi is not found."
return
1
return
1
fi
fi
if
!
_exists php
;
then
_err
"The command php is not found."
return
1
fi
# read cert and key files and urlencode both
# read cert and key files and urlencode both
_certstr
=
$(
cat
"
$_ccert
"
)
_cert
=
$(
cat
"
$_ccert
"
| _url_encode
)
_keystr
=
$(
cat
"
$_ckey
"
)
_key
=
$(
cat
"
$_ckey
"
| _url_encode
)
_cert
=
$(
php
-r
"echo urlencode(
\"
$_certstr
\"
);"
)
_key
=
$(
php
-r
"echo urlencode(
\"
$_keystr
\"
);"
)
_debug _cert
"
$_cert
"
_debug _cert
"
$_cert
"
_debug _key
"
$_key
"
_debug _key
"
$_key
"
...
...
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