Commit 8de6f28a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Add --webmhost and --webmport options

parent 189e7266
......@@ -50,6 +50,10 @@ program
.option('--upnp', 'Use UPnP to open remote port')
.option('--noupnp', 'Do not use UPnP to open remote port')
// Webmin options
.option('--webmhost <host>', 'Local network interface to connect to (IP)')
.option('--webmport <port>', 'Local network port to connect', parseInt)
.option('--salt <salt>', 'Key salt to generate this key\'s secret key')
.option('--passwd <password>', 'Password to generate this key\'s secret key')
.option('--participate <Y|N>', 'Participate to writing the blockchain')
......@@ -798,7 +802,7 @@ function webStart() {
// Add log files for this instance
logger.addHomeLogs(params.home);
}
let webminapi = yield ucoin.statics.enableHttpAdmin({ home: dbHome, name: dbName, memory: program.memory }, commandLineConf(), false);
let webminapi = yield ucoin.statics.enableHttpAdmin({ home: dbHome, name: dbName, memory: program.memory }, commandLineConf(), false, program.webmhost, program.webmport);
return webminapi.openConnections();
});
......
......@@ -14,9 +14,9 @@ module.exports = function (dbConf, overConf) {
module.exports.statics = {
enableHttpAdmin: (dbConf, overConf, httpLogs) => webmin(dbConf, overConf, [{
ip: 'localhost',
port: 9220
enableHttpAdmin: (dbConf, overConf, httpLogs, wmHost, wmPort) => webmin(dbConf, overConf, [{
ip: wmHost || 'localhost',
port: wmPort || 9220
}], httpLogs !== false),
startNode: (server, conf) => co(function *() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment