fix: sha256sum command syntax
This commit is contained in:
parent
f81b254d5a
commit
06961c2972
8 changed files with 8 additions and 8 deletions
|
|
@ -27,7 +27,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating Bitcoin Core. This may take a minute...')
|
common.logger.info('Updating Bitcoin Core. This may take a minute...')
|
||||||
!isDevMode() && common.es(`sudo supervisorctl stop bitcoin`)
|
!isDevMode() && common.es(`sudo supervisorctl stop bitcoin`)
|
||||||
common.es(`curl -#o /tmp/bitcoin.tar.gz ${coinRec.url}`)
|
common.es(`curl -#o /tmp/bitcoin.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/bitcoin.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/bitcoin.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Bitcoin Core: Package signature do not match!')
|
common.logger.info('Failed to update Bitcoin Core: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating Bitcoin Cash. This may take a minute...')
|
common.logger.info('Updating Bitcoin Cash. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop bitcoincash`)
|
common.es(`sudo supervisorctl stop bitcoincash`)
|
||||||
common.es(`curl -#Lo /tmp/bitcoincash.tar.gz ${coinRec.url}`)
|
common.es(`curl -#Lo /tmp/bitcoincash.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/bitcoincash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/bitcoincash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Bitcoin Cash: Package signature do not match!')
|
common.logger.info('Failed to update Bitcoin Cash: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ function fetchAndInstall (coinRec) {
|
||||||
const binDir = requiresUpdate ? binaries.defaultDir : binaries.dir
|
const binDir = requiresUpdate ? binaries.defaultDir : binaries.dir
|
||||||
|
|
||||||
es(`wget -q ${url}`)
|
es(`wget -q ${url}`)
|
||||||
if (es(`sha256 ${downloadFile} | awk '{print $1}'`).trim() !== hash) {
|
if (es(`sha256sum ${downloadFile} | awk '{print $1}'`).trim() !== hash) {
|
||||||
logger.info(`Failed to install ${coinRec.code}: Package signature do not match!`)
|
logger.info(`Failed to install ${coinRec.code}: Package signature do not match!`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating Dash Core. This may take a minute...')
|
common.logger.info('Updating Dash Core. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop dash`)
|
common.es(`sudo supervisorctl stop dash`)
|
||||||
common.es(`curl -#Lo /tmp/dash.tar.gz ${coinRec.url}`)
|
common.es(`curl -#Lo /tmp/dash.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/dash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/dash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Dash Core: Package signature do not match!')
|
common.logger.info('Failed to update Dash Core: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating the Geth Ethereum wallet. This may take a minute...')
|
common.logger.info('Updating the Geth Ethereum wallet. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop ethereum`)
|
common.es(`sudo supervisorctl stop ethereum`)
|
||||||
common.es(`curl -#o /tmp/ethereum.tar.gz ${coinRec.url}`)
|
common.es(`curl -#o /tmp/ethereum.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/ethereum.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/ethereum.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Geth: Package signature do not match!')
|
common.logger.info('Failed to update Geth: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating Litecoin Core. This may take a minute...')
|
common.logger.info('Updating Litecoin Core. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop litecoin`)
|
common.es(`sudo supervisorctl stop litecoin`)
|
||||||
common.es(`curl -#o /tmp/litecoin.tar.gz ${coinRec.url}`)
|
common.es(`curl -#o /tmp/litecoin.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/litecoin.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/litecoin.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Litecoin Core: Package signature do not match!')
|
common.logger.info('Failed to update Litecoin Core: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating Monero. This may take a minute...')
|
common.logger.info('Updating Monero. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop monero monero-wallet`)
|
common.es(`sudo supervisorctl stop monero monero-wallet`)
|
||||||
common.es(`curl -#o /tmp/monero.tar.gz ${coinRec.url}`)
|
common.es(`curl -#o /tmp/monero.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/monero.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/monero.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Monero: Package signature do not match!')
|
common.logger.info('Failed to update Monero: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
|
||||||
common.logger.info('Updating your Zcash wallet. This may take a minute...')
|
common.logger.info('Updating your Zcash wallet. This may take a minute...')
|
||||||
common.es(`sudo supervisorctl stop zcash`)
|
common.es(`sudo supervisorctl stop zcash`)
|
||||||
common.es(`curl -#Lo /tmp/zcash.tar.gz ${coinRec.url}`)
|
common.es(`curl -#Lo /tmp/zcash.tar.gz ${coinRec.url}`)
|
||||||
if (common.es(`sha256 /tmp/zcash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
if (common.es(`sha256sum /tmp/zcash.tar.gz | awk '{print $1}'`).trim() !== coinRec.urlHash) {
|
||||||
common.logger.info('Failed to update Zcash: Package signature do not match!')
|
common.logger.info('Failed to update Zcash: Package signature do not match!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue