fix: handle grep error output
This commit is contained in:
parent
c8f5e471be
commit
5d24b427ca
3 changed files with 26 additions and 5 deletions
|
|
@ -27,6 +27,13 @@ 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; }`)) {
|
||||
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`)
|
||||
}
|
||||
|
||||
if (isCurrentlyRunning) {
|
||||
common.logger.info('Starting wallet...')
|
||||
common.es(`sudo supervisorctl start litecoin`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue