Skip to content

Commit

Permalink
create pid directory in init script
Browse files Browse the repository at this point in the history
  • Loading branch information
5c077yP committed Aug 5, 2015
1 parent 0a121c2 commit 04be66a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/ubuntu_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

it 'renders the nrpe config' do
expect(chef_run).to render_file('/etc/nagios/nrpe.cfg').with_content('include_dir=/etc/nagios/')
expect(chef_run).to render_file('/etc/nagios/nrpe.cfg').with_content('pid_file=/var/run/nagios/nrpe.pid')
expect(chef_run).to render_file('/etc/nagios/nrpe.cfg').with_content('pid_file=/var/run/nrpe/nrpe.pid')
end

it 'creates nrpe.d directory' do
Expand Down
1 change: 1 addition & 0 deletions templates/default/nagios-nrpe-server.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ case "$1" in
start)
# Start daemon.
echo -n "Starting <%= node['nrpe']['service_name'] %>: "
install -o <%= node['nrpe']['user'] %> -g <%= node['nrpe']['group'] %> -d `dirname $PidFile`
<% if ['rhel', 'fedora'].include?(node['platform_family']) -%>daemon $NrpeBin -c $NrpeCfg -d<% else -%>start-stop-daemon --start --quiet --exec $NrpeBin -- -c $NrpeCfg -d<% end -%>
echo
;;
Expand Down

0 comments on commit 04be66a

Please sign in to comment.