From af3eee47ae74d5568ce40ab28bb87910262c41e4 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 26 Oct 2023 17:32:25 +0200 Subject: [PATCH] Dashboard: update time when timezone is changed --- emhttp/plugins/dynamix/include/ResetTZ.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/include/ResetTZ.php b/emhttp/plugins/dynamix/include/ResetTZ.php index d946a8c65..0fa61182d 100644 --- a/emhttp/plugins/dynamix/include/ResetTZ.php +++ b/emhttp/plugins/dynamix/include/ResetTZ.php @@ -13,12 +13,17 @@ /dev/null &"); +if (!is_file($pidfile)) exit; + +foreach ($scripts as $script) { + if (exec("grep -Pom1 '^$nchan/$script' $pidfile")) { + // restart selected script + exec("pkill -f $nchan/$script"); + exec("$docroot/$nchan/$script &>/dev/null &"); + } } ?>