From 8de6f28a3490536cb8e38acc012b0afe0287e040 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Thu, 24 Mar 2016 20:15:57 +0100 Subject: [PATCH] Add --webmhost and --webmport options --- bin/ucoind | 6 +++++- index.js | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/ucoind b/bin/ucoind index 50e2cfec8..54ce04a57 100755 --- a/bin/ucoind +++ b/bin/ucoind @@ -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(); }); diff --git a/index.js b/index.js index 377edcb23..be396de58 100644 --- a/index.js +++ b/index.js @@ -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 *() { -- GitLab