mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
implement hyperion restart via webui (#242)
* first try * implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-) * several fixes (including osx) merge with upstream some refactoring * add some eye candy to webui
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
#include <iomanip>
|
||||
#include <unistd.h>
|
||||
|
||||
// stl includes
|
||||
#include <iostream>
|
||||
@@ -15,6 +16,7 @@
|
||||
#include <QHostInfo>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QCoreApplication>
|
||||
|
||||
// hyperion util includes
|
||||
#include <hyperion/ImageProcessorFactory.h>
|
||||
@@ -27,6 +29,7 @@
|
||||
#include <leddevice/LedDevice.h>
|
||||
#include <HyperionConfig.h>
|
||||
#include <utils/jsonschema/JsonFactory.h>
|
||||
#include <utils/Process.h>
|
||||
|
||||
// project includes
|
||||
#include "JsonClientConnection.h"
|
||||
@@ -883,6 +886,12 @@ void JsonClientConnection::handleConfigCommand(const Json::Value & message, cons
|
||||
{
|
||||
handleConfigSetCommand(message, full_command, tan);
|
||||
}
|
||||
else if (subcommand == "reload")
|
||||
{
|
||||
// restart hyperion, this code must be put in some own class ...
|
||||
Process::restartHyperion();
|
||||
sendErrorReply("failed to restart hyperion", full_command, tan);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendErrorReply("unknown or missing subcommand", full_command, tan);
|
||||
|
Reference in New Issue
Block a user