diff --git a/lib/core/engine.js b/lib/core/engine.js index 00b6206e..8bb96a62 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -178,8 +178,18 @@ class Engine { }); self.servicesMonitor.addCheck('Webserver', function (cb) { - let devServer = 'Webserver (http://' + host + ':' + port + ')'; - return cb({name: devServer, status: 'on'}); + utils.checkIsAvailable('http://' + host + ':' + port, function (available) { + let devServer = 'Webserver (http://' + host + ':' + port + ')'; + if (available) { + return cb({name: devServer, status: 'on'}); + } else { + return cb({name: devServer, status: 'off'}); + } + }); + }); + + self.events.on('check:wentOffline:Webserver', function () { + self.logger.info("Webserver is offline"); }); self.events.setCommandHandler('start-webserver', function() { diff --git a/lib/dashboard/console.js b/lib/dashboard/console.js index 48839491..be6ba7da 100644 --- a/lib/dashboard/console.js +++ b/lib/dashboard/console.js @@ -45,7 +45,7 @@ class Console { utils.exit(); } else if (cmd === 'webserver start') { this.events.request("start-webserver"); - return "starting webserver..."; + return " "; } else if (cmd === 'webserver stop') { this.events.request("stop-webserver"); return "stopping webserver...";