[Pkg-nagios-devel] init-script exits after sucessfully creating folder /var/run/nagios
mattias at webben.nu
Sat Dec 28 20:09:13 UTC 2013
Description: Nagios service monitor
Lines 47-50 of the init script seems to be malformed.
The package init script (/etc/init.d/nsca) has the following if clause:
if [ ! -d "/var/run/nagios" ]; then
mkdir -p /var/run/nagios || log_failure_msg "couldn't create
It will cause the script to exit if the folder /var/run/nagios is lacking,
even if the mkdir is successfull.
This must, in my opinion, be malformed.
My system (raspberry pi, tmpfs for /var/run) needs the folder created on
each boot, but the script exits after the folder is created and the service
is not started.
Changing the lines to the following makes the service start on boot for me:
if [ ! -d "/var/run/nagios" || ! mkdir -p /var/run/nagios ]; then
log_failure_msg "couldn't create /var/run/nagios"
Information from the system:
root at rpi:~# which nsca
root at rpi:~# type nsca
nsca is /usr/sbin/nsca
root at rpi:~# dpkg --search /usr/sbin/nsca
root at rpi:~# dpkg --list nsca
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version
ii nsca 2.9.1-2
armhf Nagios service monitor agent
root at rpi:~# dpkg --status nsca
Status: install ok installed
Maintainer: Debian Nagios Maintainer Group <
pkg-nagios-devel at lists.alioth.debian.org>
Depends: libc6 (>= 2.4), libmcrypt4, debconf (>> 0.5) | debconf-2.0,
Suggests: nagios3, nagios-plugins-basic | nagios-plugins
Description: Nagios service monitor agent
This addon allows you to send service check results to a central
monitoring server running Nagios in a reasonably secure manner.
Nagios is a monitoring and management system for hosts, services and
Nagios' features include:
- Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP,
- Plugin interface to allow for user-developed service checks
- Contact notifications when problems occur and get resolved (via email,
pager, or user-defined method)
- Ability to define event handlers to be run during service or host
(for proactive problem resolution)
- Web output (current status, notifications, problem history, log file,
Nagios was written in C and is designed to be easy to understand and modify
to fit your own needs.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pkg-nagios-devel