Skip to content

Commit

Permalink
Fix if
Browse files Browse the repository at this point in the history
  • Loading branch information
tcorbly committed Jan 17, 2024
1 parent 10cc51e commit 70feeb1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/HomeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@ void HomeWidget::shutDown()
void HomeWidget::reboot()
{
#ifdef WOMBAT
if(QMessageBox::question(this, "Reboot?", "Please wait up to 10 seconds for the system to begin rebooting.\n\nContinue?", QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return;
if(QMessageBox::question(this, "Reboot?", "Please wait up to 10 seconds for the system to begin rebooting.\n\nContinue?", QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return;

QProcess create3ServerStop;
create3ServerStop.start("systemctl", QStringList() << "stop" << "create3_server.service");
bool create3StopRet = create3ServerStop.waitForFinished();
if(create3StopRet == false)
QMessageBox::information(this, "Failed", "Create 3 server could not be stopped.");
const int rebootRet = QProcess::execute("reboot");
if(create3StopRet == false || rebootRet < 0)
QMessageBox::information(this, "Failed", "Reboot failed.");
QProcess create3ServerStop;
create3ServerStop.start("systemctl", QStringList() << "stop" << "create3_server.service");
bool create3StopRet = create3ServerStop.waitForFinished();
if(create3StopRet == false)
QMessageBox::information(this, "Failed", "Create 3 server could not be stopped.");
const int rebootRet = QProcess::execute("reboot");
if(create3StopRet == false || rebootRet < 0)
QMessageBox::information(this, "Failed", "Reboot failed.");
#else
QMessageBox::information(this, "Not Available", "Reboot is only available on the kovan.");
#endif

void HomeWidget::lock()
{
Expand Down

0 comments on commit 70feeb1

Please sign in to comment.