mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
Fix wrong path to command in service after reload, may have changed
Service/task/run are today identified by name:id this means the path to a command is not necessarily the basis for the identity. Hence, an svc_t can now be updated with new the correct path to a command. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1382,6 +1382,9 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
||||
/* update type, may have changed from service -> task */
|
||||
svc->type = type;
|
||||
|
||||
/* update path, may have changed on reload */
|
||||
strlcpy(svc->cmd, cmd, sizeof(svc->cmd));
|
||||
|
||||
/* e.g., if missing cmd or env before */
|
||||
if (!manual)
|
||||
svc_unblock(svc);
|
||||
|
||||
Reference in New Issue
Block a user