mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
Allow setting custom pid: file for SysV init scripts
We want to find the PID of the daemon the init script starts, so we need a way to declare this to Finit. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
093b3ba467
commit
07f7caef0d
1 file changed
+1
-1
+1
-1
@@ -1326,7 +1326,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Decode any optional pid:/optional/path/to/file.pid */
|
/* Decode any optional pid:/optional/path/to/file.pid */
|
||||||
if (pid && svc_is_daemon(svc) && pid_file_parse(svc, pid))
|
if (pid && (svc_is_daemon(svc) || svc_is_sysv(svc)) && pid_file_parse(svc, pid))
|
||||||
_e("Invalid 'pid' argument to service: %s", pid);
|
_e("Invalid 'pid' argument to service: %s", pid);
|
||||||
|
|
||||||
if (username) {
|
if (username) {
|
||||||
|
|||||||
Reference in new issue
Block a user