2011-03-26 22:51:45 +00:00
|
|
|
cdist-type__process(7)
|
|
|
|
======================
|
2011-03-26 22:45:41 +00:00
|
|
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
|
|
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2011-03-26 22:51:45 +00:00
|
|
|
cdist-type__process - Start or stop process
|
2011-03-26 22:45:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2011-03-26 22:51:45 +00:00
|
|
|
This cdist type allows you to define the state of a process.
|
2011-03-26 22:45:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
REQUIRED PARAMETERS
|
|
|
|
-------------------
|
2011-03-26 22:51:45 +00:00
|
|
|
state::
|
|
|
|
State of the process: Either stopped or running.
|
2011-03-26 22:45:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONAL PARAMETERS
|
|
|
|
-------------------
|
2011-03-27 21:29:10 +00:00
|
|
|
name::
|
|
|
|
Process name to match on when using pgrep -f -x.
|
|
|
|
|
2011-03-26 23:05:30 +00:00
|
|
|
stop::
|
|
|
|
Executable to use for stopping the process.
|
|
|
|
|
|
|
|
start::
|
|
|
|
Executable to use for starting the process.
|
|
|
|
|
2011-03-26 22:45:41 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2011-06-25 21:12:38 +00:00
|
|
|
# Start if not running
|
|
|
|
__process /usr/sbin/syslog-ng --state running
|
2011-03-26 23:05:30 +00:00
|
|
|
|
2011-06-25 21:12:38 +00:00
|
|
|
# Start if not running with a different binary
|
|
|
|
__process /usr/sbin/nginx --state running --start "/etc/rc.d/nginx start"
|
2011-03-26 23:05:30 +00:00
|
|
|
|
2011-06-25 21:12:38 +00:00
|
|
|
# Stop the process using kill (the type default) - DO NOT USE THIS
|
2011-03-26 23:05:30 +00:00
|
|
|
__process /usr/sbin/sshd --state stopped
|
|
|
|
|
2011-06-25 21:12:38 +00:00
|
|
|
# Stop the process using /etc/rc.d/sshd stop - THIS ONE NOT AS WELL
|
2011-03-26 23:05:30 +00:00
|
|
|
__process /usr/sbin/sshd --state stopped --stop "/etc/rc.d/sshd stop"
|
2011-03-27 21:32:28 +00:00
|
|
|
|
|
|
|
# Ensure cups is running, which runs with -C ...:
|
|
|
|
__process cups --start "/etc/rc.d/cups start" --state running \
|
|
|
|
--name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf"
|
2011-11-15 08:20:27 +00:00
|
|
|
|
|
|
|
# Ensure rpc.statd is running (which usually runs with -L) using a regexp
|
|
|
|
__process rpcstatd --state running --start "/etc/init.d/statd start" \
|
|
|
|
--name "rpc.statd.*"
|
2011-03-26 22:45:41 +00:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
- cdist-type(7)
|
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
|
|
|
Copyright \(C) 2011 Nico Schottelius. Free use of this software is
|
|
|
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|