blob: 97efe1875af477a24ef34938489d36c4a7678dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
.TH ninit\-pidfile 8 "Dec 28, 2009"
.SH NAME
ninit\-pidfile \- work around daemons that always fork
.SH SYNOPSIS
.B ninit\-pidfile
.I servicename
.I pidfile
[
.I -H home
]
.I command
.I [parameters]
.SH DESCRIPTION
.B ninit\-pidfile
is used to work around daemons that insist on forking into the background,
but that do write a correct pid file.
.B ninit\-pidfile
forks the actual service, then waits for the pidfile to
be written. Once it can read the pid from the pidfile it will tell
ninit the real pid and quit.
.SH OPTIONS
.TP
.I servicename
the name of the service
ninit\-pidfile is installed for
.TP
.I pidfile
the filename to read the pid from
.TP
.I command
the real command to start
.TP
.I parameters
additional parameters for the command
.TP
.B \-H \fIhome\fR
.br
the home of ninit. Default: /etc/ninit
.SH USAGE
With
.B ninit
you can prepare a service and if it forks and writes
the PID in some file then type in the service directory:
echo /path/to/deamon.pidfile >
.I pidfile
For apache this looks like:
cd /etc/ninit/apache
.br
echo /var/run/apache.pid >
.I pidfile
Don't use hard or soft links here!
.br
Then
.B ninit
will start apache using
.B ninit\-pidfile
.SH AUTHOR
.B pidfilehack
was written
by Felix von Leitner.
This manpage was written by Erich Schubert <[email protected]>
for the Debian GNU/Linux operating system.
.SH "SEE ALSO"
ninit(8), nsvc(8), pidfilehack(8)
|