cdist-type__process(7)


Table of Contents

1. NAME
2. DESCRIPTION
3. REQUIRED PARAMETERS
4. OPTIONAL PARAMETERS
5. EXAMPLES
6. SEE ALSO
7. COPYING

1. NAME

cdist-type__process - Start or stop process

2. DESCRIPTION

This cdist type allows you to define the state of a process.

3. REQUIRED PARAMETERS

state
State of the process: Either stopped or running.

4. OPTIONAL PARAMETERS

name
Process name to match on when using pgrep -f -x.
stop
Executable to use for stopping the process.
start
Executable to use for starting the process.

5. EXAMPLES

# Start if not running
__process /usr/sbin/syslog-ng --state running

# Start if not running with a different binary
__process /usr/sbin/nginx --state running --start "/etc/rc.d/nginx start"

# Stop the process using kill (the type default) - DO NOT USE THIS
__process /usr/sbin/sshd --state stopped

# 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"

# 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"

# 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.*"

6. SEE ALSO

  • cdist-type(7)

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).