Server improvements and remote machine reboot (#213)
* Add remote reboot feature to Dashboard, Server & Miner * Integrated Pushover push notifications for Offline miners and periodical stats
This commit is contained in:
parent
408e7d3670
commit
de9f64e515
22 changed files with 288 additions and 40 deletions
12
src/App.cpp
12
src/App.cpp
|
@ -258,6 +258,15 @@ void App::shutdown()
|
|||
m_self->stop(false);
|
||||
}
|
||||
|
||||
void App::reboot()
|
||||
{
|
||||
auto rebootCmd = m_self->m_options->ccRebootCmd();
|
||||
if (rebootCmd) {
|
||||
system(rebootCmd);
|
||||
shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
void App::onSignal(uv_signal_t* handle, int signum)
|
||||
{
|
||||
switch (signum)
|
||||
|
@ -299,6 +308,9 @@ void App::onCommandReceived(uv_async_t* async)
|
|||
case ControlCommand::SHUTDOWN:
|
||||
App::shutdown();
|
||||
break;
|
||||
case ControlCommand::REBOOT:
|
||||
App::reboot();
|
||||
break;
|
||||
case ControlCommand::PUBLISH_CONFIG:;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue