Skip to content

Commit

Permalink
Add status command between start and stop
Browse files Browse the repository at this point in the history
  • Loading branch information
tcorbly committed Dec 1, 2023
1 parent 3eeca46 commit 1ade443
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Create3Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,28 @@ void Create3Widget::resetServer()
qDebug() << "Create3 Server failed to stop or crashed\n" << data;
}

// Need a command to run between start and stop for some reason for things to work
QProcess statusCreate3Service;
QString statusCommand = "systemctl";
QStringList statusArgs = {
"status",
"create3_server.service",
"--no-pager"
};

statusCreate3Service.start(statusCommand, statusArgs);
if(statusCreate3Service.waitForFinished())
{
QByteArray data = statusCreate3Service.readAllStandardOutput();
qDebug() << "Create3 Server status\n" << data;
}
else
{
QByteArray data = statusCreate3Service.readAllStandardError();
qDebug() << "Create3 Server failed to get status\n" << data;
}


QProcess startCreate3Service;
QString startCommand = "systemctl";
QStringList startArgs = {
Expand Down

0 comments on commit 1ade443

Please sign in to comment.