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
7a3c61b7
Commit
7a3c61b7
authored
Jan 03, 2020
by
neilpang
Browse files
check upgrade hash
https://github.com/Neilpang/acme.sh/issues/2667
parent
f59f484c
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
7a3c61b7
...
...
@@ -6303,6 +6303,7 @@ _installOnline() {
chmod
+x
$PROJECT_ENTRY
if
./
$PROJECT_ENTRY
install
"
$_nocron
"
""
"
$_noprofile
"
;
then
_info
"Install success!"
_saveaccountconf
"UPGRADE_HASH"
"
$(
_getMasterHash
)
"
fi
cd
..
...
...
@@ -6312,9 +6313,15 @@ _installOnline() {
)
}
_getMasterHash
()
{
_hash_url
=
"https://api.github.com/repos/Neilpang/acme.sh/git/refs/heads/master"
_get
$_hash_url
|
tr
-d
"
\r\n
"
|
tr
'{},'
'\n'
|
grep
'"sha":'
|
cut
-d
'"'
-f
4
}
upgrade
()
{
if
(
_initpath
[
-z
"
$FORCE
"
]
&&
[
"
$(
_getMasterHash
)
"
=
"
$(
_readaccountconf
"UPGRADE_HASH"
)
"
]
&&
_info
"Already uptodate!"
&&
exit
0
export
LE_WORKING_DIR
cd
"
$LE_WORKING_DIR
"
_installOnline
"nocron"
"noprofile"
...
...
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