.\" Man page generated from reStructuredText. . .TH "CDIST-TYPE__PROCESS" "7" "Feb 07, 2021" "6.9.4" "cdist" . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH NAME .sp cdist\-type__process \- Start or stop process .SH DESCRIPTION .sp This cdist type allows you to define the state of a process. .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B state Either "present" or "absent", defaults to "present" .TP .B name Process name to match on when using pgrep \-f \-x. .sp This is useful, if the name starts with a "/", because the leading slash is stripped away from the object id by cdist. .TP .B stop Executable to use for stopping the process. .TP .B start Executable to use for starting the process. .UNINDENT .SH MESSAGES .INDENT 0.0 .TP .B started The process was started. .TP .B stopped The process was stopped. .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Start if not running __process /usr/sbin/syslog\-ng \-\-state present # Start if not running with a different binary __process /usr/sbin/nginx \-\-state present \-\-start "/etc/rc.d/nginx start" # Stop the process using kill (the type default) \- DO NOT USE THIS __process /usr/sbin/sshd \-\-state absent # Stop the process using /etc/rc.d/sshd stop \- THIS ONE NOT AS WELL __process /usr/sbin/sshd \-\-state absent \-\-stop "/etc/rc.d/sshd stop" # Ensure cups is running, which runs with \-C ...: __process cups \-\-start "/etc/rc.d/cups start" \-\-state present \e \-\-name "/usr/sbin/cupsd \-C /etc/cups/cupsd.conf" # Ensure rpc.statd is running (which usually runs with \-L) using a regexp __process rpcstatd \-\-state present \-\-start "/etc/init.d/statd start" \e \-\-name "rpc.statd.*" .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBcdist\-type__start_on_boot\fP(7) .SH AUTHORS .nf Nico Schottelius <\fI\%nico\-cdist\-\-@\-\-schottelius.org\fP> Thomas Eckert <\fI\%tom\-\-@\-\-it\-eckert.de\fP> .fi .sp .SH COPYING .sp Copyright (C) 2011\-2012 Nico Schottelius. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .SH COPYRIGHT ungleich GmbH 2020 .\" Generated by docutils manpage writer. .