From 330393667e23515529ab64a5228e93afe0e91d85 Mon Sep 17 00:00:00 2001 From: zii Date: Sat, 24 Feb 2024 21:26:36 -0500 Subject: [PATCH] v3.4.t2 - RuntimeMaxSec only needs to apply for vid_loop services. condition added. - The app will no longer attempt to take ownership of the footage folder. --- src/common.h | 2 +- src/services.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common.h b/src/common.h index b53c377..b5750fd 100644 --- a/src/common.h +++ b/src/common.h @@ -30,7 +30,7 @@ using namespace std; -#define APP_VER "3.4.t1" +#define APP_VER "3.4.t2" #define APP_NAME "Motion Watch" #define APP_BIN "mow" #define DATETIME_FMT "yyyyMMddhhmmss" diff --git a/src/services.cpp b/src/services.cpp index 34367c6..6674a38 100644 --- a/src/services.cpp +++ b/src/services.cpp @@ -43,7 +43,12 @@ int loadService(const QString &desc, const QString &user, const QString &servNam file.write("Type=simple\n"); file.write("User=" + user.toUtf8() + "\n"); file.write("Restart=always\n"); - file.write("RuntimeMaxSec=62\n"); + + if (servName.contains("vid_loop")) + { + file.write("RuntimeMaxSec=62\n"); + } + file.write("ExecStart=/usr/bin/env " + servName.toUtf8() + "\n\n"); file.write("[Install]\n"); file.write("WantedBy=multi-user.target\n"); @@ -90,7 +95,6 @@ int loadSh(const QString &name, const QString &exeCmd, const QString &buffDir, c QProcess::execute("chmod", {"-v", "+x", file.fileName()}); QProcess::execute("chown", {servUser + ":" + servGroup, "-R", buffDir}); - QProcess::execute("chown", {servUser + ":" + servGroup, "-R", outDir}); } file.close();