|
|
|
@ -16,7 +16,9 @@ This cdist type allows you to define the state of a process. |
|
|
|
|
REQUIRED PARAMETERS |
|
|
|
|
------------------- |
|
|
|
|
state:: |
|
|
|
|
State of the process: Either stopped or running. |
|
|
|
|
State of the process: Either present or absent |
|
|
|
|
(old values "stopped" and "running" are deprecated and will be removed in |
|
|
|
|
cdist 2.1). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONAL PARAMETERS |
|
|
|
@ -40,23 +42,23 @@ EXAMPLES |
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------- |
|
|
|
|
# Start if not running |
|
|
|
|
__process /usr/sbin/syslog-ng --state running |
|
|
|
|
__process /usr/sbin/syslog-ng --state present |
|
|
|
|
|
|
|
|
|
# Start if not running with a different binary |
|
|
|
|
__process /usr/sbin/nginx --state running --start "/etc/rc.d/nginx start" |
|
|
|
|
__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 stopped |
|
|
|
|
__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 stopped --stop "/etc/rc.d/sshd stop" |
|
|
|
|
__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 running \ |
|
|
|
|
__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 running --start "/etc/init.d/statd start" \ |
|
|
|
|
__process rpcstatd --state present --start "/etc/init.d/statd start" \ |
|
|
|
|
--name "rpc.statd.*" |
|
|
|
|
-------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
@ -68,5 +70,5 @@ SEE ALSO |
|
|
|
|
|
|
|
|
|
COPYING |
|
|
|
|
------- |
|
|
|
|
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
|
|
|
|
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). |
|
|
|
|