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
5440fcdf
Commit
5440fcdf
authored
Jun 01, 2022
by
neilpang
Browse files
check the file path before copying
parent
66b2d496
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
5440fcdf
...
...
@@ -5752,8 +5752,10 @@ _installcert() {
if
[
-f
"
$_real_cert
"
]
&&
[
!
"
$_ACME_IS_RENEW
"
]
;
then
cp
"
$_real_cert
"
"
$_backup_path
/cert.bak"
fi
if
[
"
$CERT_PATH
"
!=
"
$_real_cert
"
]
;
then
cat
"
$CERT_PATH
"
>
"
$_real_cert
"
||
return
1
fi
fi
if
[
"
$_real_ca
"
]
;
then
_info
"Installing CA to:
$_real_ca
"
...
...
@@ -5764,15 +5766,18 @@ _installcert() {
if
[
-f
"
$_real_ca
"
]
&&
[
!
"
$_ACME_IS_RENEW
"
]
;
then
cp
"
$_real_ca
"
"
$_backup_path
/ca.bak"
fi
if
[
"
$CA_CERT_PATH
"
!=
"
$_real_ca
"
]
;
then
cat
"
$CA_CERT_PATH
"
>
"
$_real_ca
"
||
return
1
fi
fi
fi
if
[
"
$_real_key
"
]
;
then
_info
"Installing key to:
$_real_key
"
if
[
-f
"
$_real_key
"
]
&&
[
!
"
$_ACME_IS_RENEW
"
]
;
then
cp
"
$_real_key
"
"
$_backup_path
/key.bak"
fi
if
[
"
$CERT_KEY_PATH
"
!=
"
$_real_key
"
]
;
then
if
[
-f
"
$_real_key
"
]
;
then
cat
"
$CERT_KEY_PATH
"
>
"
$_real_key
"
||
return
1
else
...
...
@@ -5781,14 +5786,17 @@ _installcert() {
cat
"
$CERT_KEY_PATH
"
>
"
$_real_key
"
||
return
1
fi
fi
fi
if
[
"
$_real_fullchain
"
]
;
then
_info
"Installing full chain to:
$_real_fullchain
"
if
[
-f
"
$_real_fullchain
"
]
&&
[
!
"
$_ACME_IS_RENEW
"
]
;
then
cp
"
$_real_fullchain
"
"
$_backup_path
/fullchain.bak"
fi
if
[
"
$_real_fullchain
"
!=
"
$CERT_FULLCHAIN_PATH
"
]
;
then
cat
"
$CERT_FULLCHAIN_PATH
"
>
"
$_real_fullchain
"
||
return
1
fi
fi
if
[
"
$_reload_cmd
"
]
;
then
_info
"Run reload cmd:
$_reload_cmd
"
...
...
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