From ae151c741e4d1ba4c816eba82d49761235d6d675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Thu, 3 Mar 2022 00:12:12 +0000 Subject: [PATCH] fix: remove quite mode from grep --- lib/blockchain/bitcoin.js | 8 ++++---- lib/blockchain/dash.js | 14 +++++++------- lib/blockchain/litecoin.js | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/blockchain/bitcoin.js b/lib/blockchain/bitcoin.js index 2f26ad21..19bd2b6a 100644 --- a/lib/blockchain/bitcoin.js +++ b/lib/blockchain/bitcoin.js @@ -27,18 +27,18 @@ function updateCore (coinRec, isCurrentlyRunning) { common.es(`rm -r /tmp/${coinRec.dir.replace('/bin', '')}`) common.es(`rm /tmp/bitcoin.tar.gz`) - if (common.es(`ps -ef | grep -q "changetype=" /mnt/blockchains/bitcoin/bitcoin.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "changetype=" /mnt/blockchains/bitcoin/bitcoin.conf | { grep -v grep || true; }`)) { common.logger.info(`changetype already defined, skipping...`) } else { common.logger.info(`Enabling bech32 change addresses in config file..`) - common.es(`echo -e "\nchangetype=bech32" >> /mnt/blockchains/bitcoin/bitcoin.conf`) + common.es(`echo "\nchangetype=bech32" >> /mnt/blockchains/bitcoin/bitcoin.conf`) } - if (common.es(`ps -ef | grep -q "listenonion=" /mnt/blockchains/bitcoin/bitcoin.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "listenonion=" /mnt/blockchains/bitcoin/bitcoin.conf | { grep -v grep || true; }`)) { common.logger.info(`listenonion already defined, skipping...`) } else { common.logger.info(`Setting 'listenonion=0' in config file...`) - common.es(`echo -e "\nlistenonion=0" >> /mnt/blockchains/bitcoin/bitcoin.conf`) + common.es(`echo "\nlistenonion=0" >> /mnt/blockchains/bitcoin/bitcoin.conf`) } if (isCurrentlyRunning) { diff --git a/lib/blockchain/dash.js b/lib/blockchain/dash.js index 5ea965cd..c44b1a8a 100644 --- a/lib/blockchain/dash.js +++ b/lib/blockchain/dash.js @@ -27,27 +27,27 @@ function updateCore (coinRec, isCurrentlyRunning) { common.es(`rm -r /tmp/${coinRec.dir.replace('/bin', '')}`) common.es(`rm /tmp/dash.tar.gz`) - if (common.es(`ps -ef | grep -q "enableprivatesend=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "enableprivatesend=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { common.logger.info(`Switching from 'PrivateSend' to 'CoinJoin'...`) common.es(`sed -i 's/enableprivatesend/enablecoinjoin/g' /mnt/blockchains/dash/dash.conf`) - } else if (common.es(`ps -ef | grep -q "enablecoinjoin=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { + } else if (common.es(`ps -ef | grep "enablecoinjoin=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { common.logger.info(`enablecoinjoin already defined, skipping...`) } else { common.logger.info(`Enabling CoinJoin in config file...`) - common.es(`echo -e "enablecoinjoin=1" >> /mnt/blockchains/dash/dash.conf`) + common.es(`echo "enablecoinjoin=1" >> /mnt/blockchains/dash/dash.conf`) } - if (common.es(`ps -ef | grep -q "privatesendautostart=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "privatesendautostart=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { common.logger.info(`Switching from 'PrivateSend' to 'CoinJoin'...`) common.es(`sed -i 's/privatesendautostart/coinjoinautostart/g' /mnt/blockchains/dash/dash.conf`) - } else if (common.es(`ps -ef | grep -q "coinjoinautostart=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { + } else if (common.es(`ps -ef | grep "coinjoinautostart=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { common.logger.info(`coinjoinautostart already defined, skipping...`) } else { common.logger.info(`Enabling CoinJoin AutoStart in config file...`) - common.es(`echo -e "coinjoinautostart=1" >> /mnt/blockchains/dash/dash.conf`) + common.es(`echo "coinjoinautostart=1" >> /mnt/blockchains/dash/dash.conf`) } - if (common.es(`ps -ef | grep -q "litemode=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "litemode=" /mnt/blockchains/dash/dash.conf | { grep -v grep || true; }`)) { common.logger.info(`Switching from 'LiteMode' to 'DisableGovernance'...`) common.es(`sed -i 's/litemode/disablegovernance/g' /mnt/blockchains/dash/dash.conf`) } else { diff --git a/lib/blockchain/litecoin.js b/lib/blockchain/litecoin.js index a07c4db3..d3d196bf 100644 --- a/lib/blockchain/litecoin.js +++ b/lib/blockchain/litecoin.js @@ -27,11 +27,11 @@ function updateCore (coinRec, isCurrentlyRunning) { common.es(`rm -r /tmp/${coinRec.dir.replace('/bin', '')}`) common.es(`rm /tmp/litecoin.tar.gz`) - if (common.es(`ps -ef | grep -q "changetype=" /mnt/blockchains/litecoin/litecoin.conf | { grep -v grep || true; }`)) { + if (common.es(`ps -ef | grep "changetype=" /mnt/blockchains/litecoin/litecoin.conf | { grep -v grep || true; }`)) { common.logger.info(`changetype already defined, skipping...`) } else { common.logger.info(`Enabling bech32 change addresses in config file..`) - common.es(`echo -e "\nchangetype=bech32" >> /mnt/blockchains/litecoin/litecoin.conf`) + common.es(`echo "\nchangetype=bech32" >> /mnt/blockchains/litecoin/litecoin.conf`) } if (isCurrentlyRunning) {