From fab755dc629086f59e9696964d1b8c51f7e03dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 30 Dec 2021 14:23:14 +0000 Subject: [PATCH] fix: bitcoind install --- lib/blockchain/install.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/blockchain/install.js b/lib/blockchain/install.js index 8596d8f9..554e3951 100644 --- a/lib/blockchain/install.js +++ b/lib/blockchain/install.js @@ -71,7 +71,10 @@ function processCryptos (codes) { ) | crontab -` common.es(rsyncCmd) - _.forEach(updateCrypto, selectedCryptos) + _.forEach(c => { + updateCrypto(c) + common.es(`sudo supervisorctl start ${c.code}`) + }, selectedCryptos) logger.info('Installation complete.') } @@ -98,7 +101,9 @@ function setupCrypto (crypto) { function updateCrypto (crypto) { if (!common.isUpdateDependent(crypto.cryptoCode)) return const cryptoPlugin = plugin(crypto) - cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode)) + const status = common.es(`sudo supervisorctl status ${crypto.code} | awk '{ print $2 }'`).trim() + const isCurrentlyRunning = status === 'RUNNING' + cryptoPlugin.updateCore(common.getBinaries(crypto.cryptoCode), isCurrentlyRunning) } function plugin (crypto) {