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-03-26 23:05:30 +00:00
|
|
|
# Start /usr/sbin/sshd if not running
|
|
|
|
__process /usr/sbin/sshd --state running
|
|
|
|
|
|
|
|
# Start /usr/sbin/sshd if not running with a different binary
|
2011-03-26 22:51:45 +00:00
|
|
|
__process /usr/sbin/sshd --state running --start "/etc/rc.d/sshd start"
|
2011-03-26 23:05:30 +00:00
|
|
|
|
|
|
|
# Stop the process using kill (the type default)
|
|
|
|
__process /usr/sbin/sshd --state stopped
|
|
|
|
|
|
|
|
# Stop the process using /etc/rc.d/sshd stop
|
|
|
|
__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-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).
|