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
044da37c
Commit
044da37c
authored
Feb 21, 2017
by
neilpang
Browse files
change installcert parameter order
parent
1efb2085
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
044da37c
...
@@ -3653,7 +3653,7 @@ issue() {
...
@@ -3653,7 +3653,7 @@ issue() {
_savedomainconf
"Le_RealKeyPath"
"
$_real_key
"
_savedomainconf
"Le_RealKeyPath"
"
$_real_key
"
_savedomainconf
"Le_ReloadCmd"
"
$_reload_cmd
"
_savedomainconf
"Le_ReloadCmd"
"
$_reload_cmd
"
_savedomainconf
"Le_RealFullChainPath"
"
$_real_fullchain
"
_savedomainconf
"Le_RealFullChainPath"
"
$_real_fullchain
"
_installcert
"
$_main_domain
"
"
$_real_cert
"
"
$_real_key
"
"
$_real_ca
"
"
$_re
load_cmd
"
"
$_real_fullchain
"
_installcert
"
$_main_domain
"
"
$_real_cert
"
"
$_real_key
"
"
$_real_ca
"
"
$_re
al_fullchain
"
"
$_reload_cmd
"
fi
fi
}
}
...
@@ -3964,16 +3964,18 @@ installcert() {
...
@@ -3964,16 +3964,18 @@ installcert() {
_savedomainconf
"Le_ReloadCmd"
"
$_reload_cmd
"
_savedomainconf
"Le_ReloadCmd"
"
$_reload_cmd
"
_savedomainconf
"Le_RealFullChainPath"
"
$_real_fullchain
"
_savedomainconf
"Le_RealFullChainPath"
"
$_real_fullchain
"
_installcert
"
$_main_domain
"
"
$_real_cert
"
"
$_real_key
"
"
$_real_ca
"
"
$_re
load_cmd
"
"
$_real_fullchain
"
_installcert
"
$_main_domain
"
"
$_real_cert
"
"
$_real_key
"
"
$_real_ca
"
"
$_re
al_fullchain
"
"
$_reload_cmd
"
}
}
#domain cert key ca fullchain reloadcmd backup-prefix
_installcert
()
{
_installcert
()
{
_main_domain
=
"
$1
"
_main_domain
=
"
$1
"
_real_cert
=
"
$2
"
_real_cert
=
"
$2
"
_real_key
=
"
$3
"
_real_key
=
"
$3
"
_real_ca
=
"
$4
"
_real_ca
=
"
$4
"
_reload_cmd
=
"
$5
"
_real_fullchain
=
"
$5
"
_real_fullchain
=
"
$6
"
_reload_cmd
=
"
$6
"
_backup_prefix
=
"
$7
"
if
[
"
$_real_cert
"
=
"
$NO_VALUE
"
]
;
then
if
[
"
$_real_cert
"
=
"
$NO_VALUE
"
]
;
then
_real_cert
=
""
_real_cert
=
""
...
@@ -3991,11 +3993,13 @@ _installcert() {
...
@@ -3991,11 +3993,13 @@ _installcert() {
_real_fullchain
=
""
_real_fullchain
=
""
fi
fi
_backup_path
=
"
$DOMAIN_BACKUP_PATH
/
$_backup_prefix
"
mkdir
-p
"
$_backup_path
"
if
[
"
$_real_cert
"
]
;
then
if
[
"
$_real_cert
"
]
;
then
_info
"Installing cert to:
$_real_cert
"
_info
"Installing cert to:
$_real_cert
"
if
[
-f
"
$_real_cert
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
if
[
-f
"
$_real_cert
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
mkdir
-p
"
$DOMAIN_BACKUP_PATH
"
cp
"
$_real_cert
"
"
$_backup_path
/cert.bak"
cp
"
$_real_cert
"
"
$DOMAIN_BACKUP_PATH
/cert.bak"
fi
fi
cat
"
$CERT_PATH
"
>
"
$_real_cert
"
cat
"
$CERT_PATH
"
>
"
$_real_cert
"
fi
fi
...
@@ -4007,8 +4011,7 @@ _installcert() {
...
@@ -4007,8 +4011,7 @@ _installcert() {
cat
"
$CA_CERT_PATH
"
>>
"
$_real_ca
"
cat
"
$CA_CERT_PATH
"
>>
"
$_real_ca
"
else
else
if
[
-f
"
$_real_ca
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
if
[
-f
"
$_real_ca
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
mkdir
-p
"
$DOMAIN_BACKUP_PATH
"
cp
"
$_real_ca
"
"
$_backup_path
/ca.bak"
cp
"
$_real_ca
"
"
$DOMAIN_BACKUP_PATH
/ca.bak"
fi
fi
cat
"
$CA_CERT_PATH
"
>
"
$_real_ca
"
cat
"
$CA_CERT_PATH
"
>
"
$_real_ca
"
fi
fi
...
@@ -4017,8 +4020,7 @@ _installcert() {
...
@@ -4017,8 +4020,7 @@ _installcert() {
if
[
"
$_real_key
"
]
;
then
if
[
"
$_real_key
"
]
;
then
_info
"Installing key to:
$_real_key
"
_info
"Installing key to:
$_real_key
"
if
[
-f
"
$_real_key
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
if
[
-f
"
$_real_key
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
mkdir
-p
"
$DOMAIN_BACKUP_PATH
"
cp
"
$_real_key
"
"
$_backup_path
/key.bak"
cp
"
$_real_key
"
"
$DOMAIN_BACKUP_PATH
/key.bak"
fi
fi
cat
"
$CERT_KEY_PATH
"
>
"
$_real_key
"
cat
"
$CERT_KEY_PATH
"
>
"
$_real_key
"
fi
fi
...
@@ -4026,8 +4028,7 @@ _installcert() {
...
@@ -4026,8 +4028,7 @@ _installcert() {
if
[
"
$_real_fullchain
"
]
;
then
if
[
"
$_real_fullchain
"
]
;
then
_info
"Installing full chain to:
$_real_fullchain
"
_info
"Installing full chain to:
$_real_fullchain
"
if
[
-f
"
$_real_fullchain
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
if
[
-f
"
$_real_fullchain
"
]
&&
[
!
"
$IS_RENEW
"
]
;
then
mkdir
-p
"
$DOMAIN_BACKUP_PATH
"
cp
"
$_real_fullchain
"
"
$_backup_path
/fullchain.bak"
cp
"
$_real_fullchain
"
"
$DOMAIN_BACKUP_PATH
/fullchain.bak"
fi
fi
cat
"
$CERT_FULLCHAIN_PATH
"
>
"
$_real_fullchain
"
cat
"
$CERT_FULLCHAIN_PATH
"
>
"
$_real_fullchain
"
fi
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