mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00: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:
1 parent
f08d375c36
commit
e2f070649d
1 file changed
+3
@@ -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