27 lines
629 B
JavaScript
27 lines
629 B
JavaScript
const path = require('path')
|
|
|
|
const coinUtils = require('../coin-utils')
|
|
|
|
const common = require('./common')
|
|
|
|
module.exports = {setup}
|
|
|
|
const coinRec = coinUtils.getCryptoCurrency('DASH')
|
|
|
|
function setup (dataDir) {
|
|
common.firewall([coinRec.defaultPort])
|
|
const config = buildConfig()
|
|
common.writeFile(path.resolve(dataDir, coinRec.configFile), config)
|
|
const cmd = `/usr/local/bin/${coinRec.daemon} -datadir=${dataDir}`
|
|
common.writeSupervisorConfig(coinRec, cmd)
|
|
}
|
|
|
|
function buildConfig () {
|
|
return `rpcuser=lamassuserver
|
|
rpcpassword=${common.randomPass()}
|
|
dbcache=500
|
|
keypool=10000
|
|
litemode=1
|
|
prune=4000
|
|
txindex=0`
|
|
}
|