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:
@@ -1,10 +1,5 @@
|
||||
#include <utils/FileUtils.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace FileUtils {
|
||||
@@ -15,21 +10,5 @@ std::string getBaseName( std::string sourceFile)
|
||||
return fi.fileName().toStdString();
|
||||
}
|
||||
|
||||
std::string command_exec(const char* cmd)
|
||||
{
|
||||
char buffer[128];
|
||||
std::string result = "";
|
||||
std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);
|
||||
if (pipe)
|
||||
{
|
||||
while (!feof(pipe.get()))
|
||||
{
|
||||
if (fgets(buffer, 128, pipe.get()) != NULL)
|
||||
result += buffer;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user