mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07: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
-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 */
|
||||
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);
|
||||
|
||||
if (username) {
|
||||
|
||||
Reference in New Issue
Block a user