2022-09-02 17:58:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
$cwfd = inotify_init();
|
|
|
|
if ($cwfd !== false)
|
|
|
|
{
|
2022-09-03 21:13:43 +02:00
|
|
|
$watch_descriptor = inotify_add_watch($cwfd, $configDir, IN_CLOSE_WRITE | IN_MODIFY | IN_MOVE);
|
2022-09-02 17:58:13 +02:00
|
|
|
logger(ERROR, _("configWatchInit : Inotify retourne 'false'"), __FILE__ . ":" . __LINE__);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function configWatchInit()
|
|
|
|
{
|
|
|
|
global $cwfd;
|
|
|
|
logger(DEBUG, _("configWatchInit : Initialise la surveillance du dossier des configurations"), __FILE__ . ":" . __LINE__);
|
|
|
|
if ($cwfd !== false)
|
|
|
|
{
|
|
|
|
$read = array($cwfd);
|
|
|
|
$write = null;
|
|
|
|
$except = null;
|
|
|
|
stream_select($read, $write, $except,0);
|
|
|
|
stream_set_blocking($cwfd, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|