mirror of
https://github.com/troglobit/finit.git
synced 2026-11-30 21:18:22 +00:00
Fix bug: re-registering a former service as task does not work
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
b04dc4d457
commit
79e9dabc11
1 file changed
+3
@@ -1260,6 +1260,9 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
if (type == SVC_TYPE_SERVICE && manual)
|
if (type == SVC_TYPE_SERVICE && manual)
|
||||||
svc_stop(svc);
|
svc_stop(svc);
|
||||||
} else {
|
} else {
|
||||||
|
/* update type, may have changed from service -> task */
|
||||||
|
svc->type = type;
|
||||||
|
|
||||||
/* e.g., if missing cmd or env before */
|
/* e.g., if missing cmd or env before */
|
||||||
svc_unblock(svc);
|
svc_unblock(svc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user