Fix touch-reload regression from 3bb1e41

When reloading we check if service .conf files have been modified since
the last time we read them.  In 3bb1e41 we changed it so we load only
the enabled/*.conf files, which led to our no longer properly detecting
changed files since we monitor changes in what the symlinks point to.

This patch fixes that by checking the target for changes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-03-29 23:15:36 +02:00
parent a24fc941a6
commit bda4da71a6
+11 -3
View File
@@ -792,13 +792,21 @@ int conf_any_change(void)
int conf_changed(char *file)
{
int rc = 0;
char *rp;
if (!file)
return 0;
if (conf_find(file))
return 1;
rp = realpath(file, NULL);
if (!rp)
return 0;
return 0;
if (conf_find(rp))
rc = 1;
free(rp);
return rc;
}
static void conf_cb(uev_t *w, void *arg, int events)