Merge pull request #1184 from siiky/fix/lam-424/echo-e

fix: `sh`'s `echo` doesn't have `-e`
This commit is contained in:
Rafael Taranto 2022-04-09 21:53:40 +01:00 committed by GitHub
commit bd5e47adda
5 changed files with 16 additions and 11 deletions

View file

@ -31,14 +31,14 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.logger.info(`changetype already defined, skipping...`) common.logger.info(`changetype already defined, skipping...`)
} else { } else {
common.logger.info(`Enabling bech32 change addresses in config file..`) 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(`grep "listenonion=" /mnt/blockchains/bitcoin/bitcoin.conf || true`)) { if (common.es(`grep "listenonion=" /mnt/blockchains/bitcoin/bitcoin.conf || true`)) {
common.logger.info(`listenonion already defined, skipping...`) common.logger.info(`listenonion already defined, skipping...`)
} else { } else {
common.logger.info(`Setting 'listenonion=0' in config file...`) 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) { if (isCurrentlyRunning) {
@ -63,5 +63,6 @@ changetype=bech32
walletrbf=1 walletrbf=1
bind=0.0.0.0:8332 bind=0.0.0.0:8332
rpcport=8333 rpcport=8333
listenonion=0` listenonion=0
`
} }

View file

@ -46,5 +46,6 @@ keypool=10000
prune=4000 prune=4000
daemon=0 daemon=0
bind=0.0.0.0:8335 bind=0.0.0.0:8335
rpcport=8336` rpcport=8336
`
} }

View file

@ -34,7 +34,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.logger.info(`enablecoinjoin already defined, skipping...`) common.logger.info(`enablecoinjoin already defined, skipping...`)
} else { } else {
common.logger.info(`Enabling CoinJoin in config file...`) common.logger.info(`Enabling CoinJoin in config file...`)
common.es(`echo -e "\nenablecoinjoin=1" >> /mnt/blockchains/dash/dash.conf`) common.es(`echo "\nenablecoinjoin=1" >> /mnt/blockchains/dash/dash.conf`)
} }
if (common.es(`grep "privatesendautostart=" /mnt/blockchains/dash/dash.conf || true`)) { if (common.es(`grep "privatesendautostart=" /mnt/blockchains/dash/dash.conf || true`)) {
@ -44,14 +44,14 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.logger.info(`coinjoinautostart already defined, skipping...`) common.logger.info(`coinjoinautostart already defined, skipping...`)
} else { } else {
common.logger.info(`Enabling CoinJoin AutoStart in config file...`) common.logger.info(`Enabling CoinJoin AutoStart in config file...`)
common.es(`echo -e "\ncoinjoinautostart=1" >> /mnt/blockchains/dash/dash.conf`) common.es(`echo "\ncoinjoinautostart=1" >> /mnt/blockchains/dash/dash.conf`)
} }
if (common.es(`grep "litemode=" /mnt/blockchains/dash/dash.conf || true`)) { if (common.es(`grep "litemode=" /mnt/blockchains/dash/dash.conf || true`)) {
common.logger.info(`Switching from 'LiteMode' to 'DisableGovernance'...`) common.logger.info(`Switching from 'LiteMode' to 'DisableGovernance'...`)
common.es(`sed -i 's/litemode/disablegovernance/g' /mnt/blockchains/dash/dash.conf`) common.es(`sed -i 's/litemode/disablegovernance/g' /mnt/blockchains/dash/dash.conf`)
} else { } else {
common.es(`echo -e "\ndisablegovernance already defined, skipping..."`) common.es(`echo "\ndisablegovernance already defined, skipping..."`)
} }
if (isCurrentlyRunning) { if (isCurrentlyRunning) {
@ -71,5 +71,6 @@ disablegovernance=1
prune=4000 prune=4000
txindex=0 txindex=0
enablecoinjoin=1 enablecoinjoin=1
coinjoinautostart=1` coinjoinautostart=1
`
} }

View file

@ -31,7 +31,7 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.logger.info(`changetype already defined, skipping...`) common.logger.info(`changetype already defined, skipping...`)
} else { } else {
common.logger.info(`Enabling bech32 change addresses in config file..`) 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) { if (isCurrentlyRunning) {
@ -52,5 +52,6 @@ keypool=10000
prune=4000 prune=4000
daemon=0 daemon=0
addresstype=p2sh-segwit addresstype=p2sh-segwit
changetype=bech32` changetype=bech32
`
} }

View file

@ -49,5 +49,6 @@ addnode=mainnet.z.cash
rpcuser=lamassuserver rpcuser=lamassuserver
rpcpassword=${common.randomPass()} rpcpassword=${common.randomPass()}
dbcache=500 dbcache=500
keypool=10000` keypool=10000
`
} }