mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
fix webserver service check
This commit is contained in:
parent
113bb25142
commit
14d330a729
@ -178,8 +178,18 @@ class Engine {
|
|||||||
});
|
});
|
||||||
|
|
||||||
self.servicesMonitor.addCheck('Webserver', function (cb) {
|
self.servicesMonitor.addCheck('Webserver', function (cb) {
|
||||||
let devServer = 'Webserver (http://' + host + ':' + port + ')';
|
utils.checkIsAvailable('http://' + host + ':' + port, function (available) {
|
||||||
return cb({name: devServer, status: 'on'});
|
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() {
|
self.events.setCommandHandler('start-webserver', function() {
|
||||||
|
@ -45,7 +45,7 @@ class Console {
|
|||||||
utils.exit();
|
utils.exit();
|
||||||
} else if (cmd === 'webserver start') {
|
} else if (cmd === 'webserver start') {
|
||||||
this.events.request("start-webserver");
|
this.events.request("start-webserver");
|
||||||
return "starting webserver...";
|
return " ";
|
||||||
} else if (cmd === 'webserver stop') {
|
} else if (cmd === 'webserver stop') {
|
||||||
this.events.request("stop-webserver");
|
this.events.request("stop-webserver");
|
||||||
return "stopping webserver...";
|
return "stopping webserver...";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user