From cb8ebcb6a86303f2ed1ff13c30ee3dbfebc7d529 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 10 Apr 2023 14:37:56 -0700 Subject: [PATCH] admin: kill go-vod when changing config Signed-off-by: Varun Patil --- lib/Controller/OtherController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Controller/OtherController.php b/lib/Controller/OtherController.php index 51707d32..2875c872 100644 --- a/lib/Controller/OtherController.php +++ b/lib/Controller/OtherController.php @@ -87,8 +87,14 @@ class OtherController extends GenericApiController throw Exceptions::Forbidden('Cannot change settings in readonly mode'); } + // Assign config with type checking Util::setSystemConfig($key, $value); + // If changing vod settings, kill any running go-vod instances + if (0 === strpos($key, 'memories.vod.')) { + Util::pkill('go-vod'); + } + return new JSONResponse([], Http::STATUS_OK); }); }