Follow-up to f4a0b99: track modifications of service env: files

Add support for monitoring environment files for services declared with
the `env:[-]/path/to/file` option.  The default path to such files has
been chosen to follow Debian and Buildroot /etc/default/*

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-02-25 17:14:26 +01:00
1 parent 7ef25abecf
commit 74d3194775
4 files changed
+55 -7

No files matched your search

+1 -1
View File
@@ -1116,7 +1116,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
memcpy(svc->rlimit, rlimit, sizeof(svc->rlimit));
/* New, recently modified or unchanged ... used on reload. */
if (file && conf_changed(file))
if ((file && conf_changed(file)) || conf_changed(svc_getenv(svc)))
svc_mark_dirty(svc);
else
svc_mark_clean(svc);