mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 09:39:58 -06:00
Dashboard: update time when timezone is changed
This commit is contained in:
23
emhttp/plugins/dynamix/include/ResetTZ.php
Normal file
23
emhttp/plugins/dynamix/include/ResetTZ.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2023, Lime Technology
|
||||
* Copyright 2012-2023, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
$pid = '/var/run/nchan.pid';
|
||||
$nchan = 'webGui/nchan/update_3';
|
||||
|
||||
if (is_file($pid) && exec("grep -Pom1 '^$nchan' $pid")) {
|
||||
// restart update_3 script
|
||||
exec("pkill -f $nchan");
|
||||
exec("$docroot/$nchan &>/dev/null &");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user