<div dir="ltr"><div><div><div><div><div>Package: nsca<br>Version: 2.9.1-2<br>Architecture: armhf<br>Description: Nagios service monitor<br><br></div>Lines 47-50 of the init script seems to be malformed.<br><br></div>The package init script (/etc/init.d/nsca) has the following if clause:<br>
<br>if [ ! -d "/var/run/nagios" ]; then<br> mkdir -p /var/run/nagios || log_failure_msg "couldn't create /var/run/nagios"<br> exit 1<br>fi<br><br></div>It will cause the script to exit if the folder /var/run/nagios is lacking, even if the mkdir is successfull.<br>
<br>This must, in my opinion, be malformed.<br><br></div>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.<br>
<br></div>Changing the lines to the following makes the service start on boot for me:<br><br>if [ ! -d "/var/run/nagios" || ! mkdir -p /var/run/nagios ]; then<br> log_failure_msg "couldn't create /var/run/nagios"<br>
exit 1<br>fi<br><div><div><div><div><div><br><br>Information from the system:<br>root@rpi:~# which nsca<br>/usr/sbin/nsca<br>root@rpi:~# type nsca<br>nsca is /usr/sbin/nsca<br>root@rpi:~# dpkg --search /usr/sbin/nsca<br>
nsca: /usr/sbin/nsca<br>root@rpi:~# dpkg --list nsca<br>Desired=Unknown/Install/Remove/Purge/Hold<br>| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend<br>|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)<br>
||/ Name Version Architecture Description<br>+++-=======================================-========================-========================-===================================================================================<br>
ii nsca 2.9.1-2 armhf Nagios service monitor agent<br>root@rpi:~# dpkg --status nsca<br>Package: nsca<br>Status: install ok installed<br>Priority: optional<br>
Section: net<br>Installed-Size: 126<br>Maintainer: Debian Nagios Maintainer Group <<a href="mailto:pkg-nagios-devel@lists.alioth.debian.org">pkg-nagios-devel@lists.alioth.debian.org</a>><br>Architecture: armhf<br>Version: 2.9.1-2<br>
Depends: libc6 (>= 2.4), libmcrypt4, debconf (>> 0.5) | debconf-2.0, nsca-client, confget<br>Suggests: nagios3, nagios-plugins-basic | nagios-plugins<br>Conffiles:<br> /etc/nsca.cfg 5de6af7fc3db8b95a1a9238b6cce8aa0<br>
/etc/init.d/nsca 64b8f41f3240a8272f04542642a570ff<br>Description: Nagios service monitor agent<br> This addon allows you to send service check results to a central<br> monitoring server running Nagios in a reasonably secure manner.<br>
.<br> Nagios is a monitoring and management system for hosts, services and<br> networks.<br> .<br> Nagios' features include:<br> .<br> - Monitoring of network services (via TCP port, SMTP, POP3, HTTP, NNTP,<br> PING, etc.)<br>
- Plugin interface to allow for user-developed service checks<br> - Contact notifications when problems occur and get resolved (via email,<br> pager, or user-defined method)<br> - Ability to define event handlers to be run during service or host events<br>
(for proactive problem resolution)<br> - Web output (current status, notifications, problem history, log file,<br> etc.)<br> .<br> Nagios was written in C and is designed to be easy to understand and modify<br>
to fit your own needs.<br><br></div><div>Sincerely,<br>Mattias<br></div><div><br></div></div></div></div></div></div>