Merge pull request #826 from josepfo/feat/modify-l-c-script

Feat: modify lamassu install script
This commit is contained in:
Rafael Taranto 2021-11-11 18:34:11 +00:00 committed by GitHub
commit 92aa9220ff
3 changed files with 48 additions and 6 deletions

View file

@ -70,6 +70,8 @@ function processCryptos (codes) {
) | crontab -`
common.es(rsyncCmd)
_.forEach(updateCrypto, selectedCryptos)
logger.info('Installation complete.')
}
@ -92,6 +94,12 @@ function setupCrypto (crypto) {
process.chdir(oldDir)
}
function updateCrypto (crypto) {
if (!common.isUpdateDependent(crypto.cryptoCode)) return
const cryptoPlugin = plugin(crypto)
cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode))
}
function plugin (crypto) {
const plugin = PLUGINS[crypto.cryptoCode]
if (!plugin) throw new Error(`No such plugin: ${crypto.cryptoCode}`)