Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
erinharrington-12 committed Jun 14, 2024
1 parent b38127e commit 9c05660
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/HomeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,14 @@ void HomeWidget::reboot()
bool create3StopRet = create3ServerStop.waitForFinished();
qDebug() << "Create 3 server stop return value: " << create3StopRet;
qDebug() << "Create 3 server exit code: " << create3ServerStop.exitCode();
if (!create3StopRet || create3ServerStop.exitCode() != 0)
{
QMessageBox::information(this, "Failed", "Create 3 server could not be stopped.");
msgBox->close();
return;
}
if(create3StopRet == false)
QMessageBox::information(this, "Failed", "Create 3 server could not be stopped.");

qDebug() << "Rebooting the system...";
// Reboot the system
QProcess rebootProcess;
rebootProcess.start("sudo", QStringList() << "reboot");
bool rebootRet = rebootProcess.waitForFinished();
qDebug() << "Reboot process return value: " << rebootRet;
qDebug() << "Reboot process exit code: " << rebootProcess.exitCode();
if (!rebootRet || rebootProcess.exitCode() != 0)
{
QMessageBox::information(this, "Failed", "Reboot failed.");
}
const int rebootRet = QProcess::execute("reboot");
if(create3StopRet == false || rebootRet < 0)
QMessageBox::information(this, "Failed", "Reboot failed.");

msgBox->close();
});
Expand Down

0 comments on commit 9c05660

Please sign in to comment.