johnbellone/nrpe-ng-cookbook

View on GitHub
templates/centos/upstart.conf.erb

Summary

Maintainability
Test Coverage
<% @group = Etc.getgrgid(Etc.getpwnam(@user).gid).name %>
# nrpe - the Nagios Remote Plugin Executor
#
# nrpe is a program that runs plugins on this host
# and reports the results back to a nagios server
#
# Copyright (c) 2016 Nagios(R) Core(TM) Development Team

description        "the Nagios Remote Plugin Executor"

oom -10

start on started network
stop on runlevel [!2345]

expect fork
respawn

console output
pre-start script
  if [ -d <%= @directory %> ]; then
    /bin/mkdir -p <%= @directory %>
    /bin/chmod 0775 <%= @directory %>
    /bin/chown <%= @user %>:<%= @group %> <%= @directory %>
  fi
end script

exec <%= @command %>