44 lines
4.5 KiB
HTML
44 lines
4.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>cdist-type__process(7)</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.77.1" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="idp196912"></a>cdist-type__process(7)</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Nico</span> <span class="surname">Schottelius</span></h3><code class="email"><<a class="email" href="mailto:nico-cdist--@--schottelius.org">nico-cdist--@--schottelius.org</a>></code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="#_name">1. NAME</a></span></dt><dt><span class="section"><a href="#_description">2. DESCRIPTION</a></span></dt><dt><span class="section"><a href="#_required_parameters">3. REQUIRED PARAMETERS</a></span></dt><dt><span class="section"><a href="#_optional_parameters">4. OPTIONAL PARAMETERS</a></span></dt><dt><span class="section"><a href="#_examples">5. EXAMPLES</a></span></dt><dt><span class="section"><a href="#_see_also">6. SEE ALSO</a></span></dt><dt><span class="section"><a href="#_copying">7. COPYING</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cdist-type__process - Start or stop process</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_description"></a>2. DESCRIPTION</h2></div></div></div><p>This cdist type allows you to define the state of a process.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_required_parameters"></a>3. REQUIRED PARAMETERS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||
state
|
||
</span></dt><dd>
|
||
Either "present" or "absent", defaults to "present"
|
||
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_optional_parameters"></a>4. OPTIONAL PARAMETERS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
|
||
name
|
||
</span></dt><dd><p class="simpara">
|
||
Process name to match on when using pgrep -f -x.
|
||
</p><pre class="literallayout">This is useful, if the name starts with a "/",
|
||
because the leading slash is stripped away from
|
||
the object id by cdist.</pre></dd><dt><span class="term">
|
||
stop
|
||
</span></dt><dd>
|
||
Executable to use for stopping the process.
|
||
</dd><dt><span class="term">
|
||
start
|
||
</span></dt><dd>
|
||
Executable to use for starting the process.
|
||
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_examples"></a>5. EXAMPLES</h2></div></div></div><pre class="screen"># 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 \
|
||
--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" \
|
||
--name "rpc.statd.*"</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>6. SEE ALSO</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
|
||
cdist-type(7)
|
||
</li><li class="listitem">
|
||
cdist-type__start_on_boot(7)
|
||
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_copying"></a>7. COPYING</h2></div></div></div><p>Copyright (C) 2011-2012 Nico Schottelius. Free use of this software is
|
||
granted under the terms of the GNU General Public License version 3 (GPLv3).</p></div></div></body></html>
|