Various Ubuntu changes.

This commit is contained in:
Robin Davies
2021-09-08 13:15:49 -04:00
parent eb0dc52322
commit 210e496ffd
12 changed files with 130 additions and 105 deletions
+6 -3
View File
@@ -87,7 +87,7 @@ void delayedRestartProc()
{
sleep(1); // give a chance for websocket messages to propagate.
Lv2Log::error("Delayed Restart");
std::string pipedalConfigPath = std::filesystem::path(GetSelfExePath()).parent_path() / "pipedalconfig";
std::string pipedalConfigPath = std::filesystem::path(getSelfExePath()).parent_path() / "pipedalconfig";
std::stringstream s;
s << pipedalConfigPath.c_str() << " --restart --excludeShutdownService";
@@ -104,6 +104,9 @@ bool setJackConfiguration(JackServerSettings serverSettings)
serverSettings.Write();
silentSysExec("/usr/bin/systemctl unmask jack");
silentSysExec("/usr/bin/systemctl enable jack");
std::thread delayedRestartThread(delayedRestartProc);
delayedRestartThread.detach();
return true;
@@ -241,11 +244,11 @@ private:
} else if (s == "shutdown")
{
result = SysExec("/usr/sbin/shutdown -P now");
result = sysExec("/usr/sbin/shutdown -P now");
}
else if (s == "restart")
{
result = SysExec("/usr/sbin/shutdown -r now");
result = sysExec("/usr/sbin/shutdown -r now");
} else if (startsWith(s,"setJackConfiguration "))
{
auto remainder = s.substr(strlen("setJackConfiguration "));