Follow-up to a613ee9, handle reload as well (existing svc)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-03-19 09:33:33 +01:00
1 parent e55fd19091
commit ecb5949679
1 file changed
+8 -8
+8 -8
View File
@@ -1570,15 +1570,15 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
} else
svc = svc_find(name, id);
if (!whichp(cmd)) {
if (nowarn)
return 0;
warn("%s: skipping %s", file ? file : "static", cmd);
return errno;
}
if (!svc) {
if (!whichp(cmd)) {
if (nowarn)
return 0;
warn("%s: skipping %s", file ? file : "static", cmd);
return errno;
}
dbg("Creating new svc for %s name %s id %s type %d", cmd, name, id, type);
svc = svc_new(cmd, name, id, type);
if (!svc) {