start-stop-daemon.8 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .\" Hey, Emacs! This is an -*- nroff -*- source file.
  2. .TH START\-STOP\-DAEMON 8 "15th March 1997" "Debian Project" "Debian GNU/Linux"
  3. .SH NAME
  4. start\-stop\-daemon \- start and stop system daemon programs
  5. .SH SYNOPSIS
  6. .B start-stop-daemon
  7. .BR -S|--start
  8. .IR "options ... -- arguments ..."
  9. .HP
  10. .B start-stop-daemon
  11. .BR -K|--stop
  12. .IR "options ..."
  13. .HP
  14. .B start-stop-daemon
  15. .BR -H|--help
  16. .HP
  17. .B start-stop-daemon
  18. .BR -V|--version
  19. .SH DESCRIPTION
  20. .B start\-stop\-daemon
  21. is used to control the creation and termination of system-level processes.
  22. Using the
  23. .BR --exec
  24. ,
  25. .BR --pidfile
  26. ,
  27. .BR --user
  28. , and
  29. .BR --name
  30. options,
  31. .B start\-stop\-daemon
  32. can be configured to find existing instances of a running process.
  33. With
  34. .BR --start
  35. ,
  36. .B start\-stop\-daemon
  37. checks for the existence of a specified process.
  38. If such a process exists,
  39. .B start\-stop\-daemon
  40. does nothing, and exits with error status 1 (0 if
  41. .BR --oknodo
  42. is specified).
  43. If such a process does not exist, it starts an
  44. instance, using either the executable specified by
  45. .BR --exec
  46. , (or, if specified, by
  47. .BR --startas
  48. ).
  49. Any arguments given after
  50. .BR --
  51. on the command line are passed unmodified to the program being
  52. started.
  53. With
  54. .BR --stop
  55. ,
  56. .B start\-stop\-daemon
  57. also checks for the existence of a specified process.
  58. If such a process exists,
  59. .B start\-stop\-daemon
  60. sends it the signal specified by
  61. .BR --signal
  62. , and exits with error status 0.
  63. If such a process does not exist,
  64. .B start\-stop\-daemon
  65. exits with error status 1
  66. (0 if
  67. .BR --oknodo
  68. is specified).
  69. .SH OPTIONS
  70. .TP
  71. .I -x|--exec executable
  72. Check for processes that are instances of this executable (according to
  73. .B /proc/
  74. .I pid
  75. .B /exe
  76. ).
  77. .TP
  78. .I -p|--pidfile pid-file
  79. Check for processes whose process-id is specified in
  80. .I pid-file.
  81. .TP
  82. .I -u|--user username|uid
  83. Check for processes owned by the user specified by
  84. .I username
  85. or
  86. .I uid.
  87. .TP
  88. .I -n|--name process-name
  89. Check for processes with the name
  90. .I process-name
  91. (according to
  92. .B /proc/
  93. .I pid
  94. .B /stat
  95. ).
  96. .TP
  97. .I -s|--signal signal
  98. With
  99. .BR --stop
  100. , specifies the signal to send to processes being stopped (default 15).
  101. .TP
  102. .I -a|--startas pathname
  103. With
  104. .B --start
  105. , start the process specified by
  106. .I pathname.
  107. If not specified, defaults to the argument given to
  108. .B --exec.
  109. .TP
  110. .I -t|--test
  111. Print actions that would be taken and set appropriate return value,
  112. but take no action.
  113. .TP
  114. .I -o|--oknodo
  115. Return exit status 0 instead of 1 if no actions are (would be) taken.
  116. .TP
  117. .I -q|--quiet
  118. Do not print informational messages; only display error messages.
  119. .TP
  120. .I -c|--chuid
  121. Change to this username/uid before starting the process
  122. .TP
  123. .I -b|--background
  124. Typically used with programs that don't detach on their own. This option
  125. will force
  126. .B start-stop-daemon
  127. to fork before starting the process, and force it into the background.
  128. .B WARNING:
  129. start-stop-daemon
  130. cannot check the exit status if the process fails to execute for
  131. .B any
  132. reason. This is a last resort, and is only meant for programs that either
  133. make no sense forking on their own, or where it's not feasible to add the
  134. code for it to do this itself.
  135. .TP
  136. .I -m|--make-pidfile
  137. Used when starting a program that does not create its own pid file. This
  138. option will make
  139. .B start-stop-daemon
  140. create the file referenced with
  141. .B --pidfile
  142. and place the pid into it just before executing the process. Note, it will
  143. not be removed when stopping the program.
  144. .TP
  145. .I -v|--verbose
  146. Print verbose informational messages.
  147. .TP
  148. .I -H|--help
  149. Print help information; then exit.
  150. .TP
  151. .I -V|--version
  152. Print version information; then exit.
  153. .SH AUTHORS
  154. Ian Jackson <ijackson@gnu.ai.mit.edu>
  155. Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>
  156. Manual page by Klee Dienes <klee@mit.edu>.