diff --git a/configWatch.php b/configWatch.php index e1e4b72..b2dfa33 100644 --- a/configWatch.php +++ b/configWatch.php @@ -4,7 +4,7 @@ $cwfd = inotify_init(); if ($cwfd !== false) { - $watch_descriptor = inotify_add_watch($cwfd, $configDir, IN_CLOSE_WRITE); + $watch_descriptor = inotify_add_watch($cwfd, $configDir, IN_CLOSE_WRITE | IN_MODIFY | IN_MOVE); logger(ERROR, _("configWatchInit : Inotify retourne 'false'"), __FILE__ . ":" . __LINE__); } @@ -23,28 +23,5 @@ function configWatchInit() } } -function configWach() :void -{ - global $cwfd, $configDir; - if ($cwfd !== false) - { - $input = inotify_read($cwfd); // Does no block, and return false if no events are pending - if ($input !== false) - { - foreach ($input as $event) - { - logger(DEBUG, _("configWatch : inclus ") . $configDir . "/" . $event["name"], __FILE__ . ":" . __LINE__); - if (pathinfo($event["name"], PATHINFO_EXTENSION) == "php") - { - include $configDir . "/" . $event["name"]; - }else - { - logger(DEBUG, _("configWatch : mauvaise extension, n'inclus pas ") . $configDir . "/" . $event["name"], __FILE__ . ":" . __LINE__); - } - } - } - } - -} ?>