Requires: ndoutils
Requires: ndoutils-mysql
+Requires: rt3
+
%description nagios
Scripts and setup necessary to integrate and monitor PLC with Nagios.
install -D -m 755 zabbix/monitor-zabbix.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/zabbix
install -D -m 755 nagios/monitor-nagios.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor-nagios
-install -D -m 644 nagios/monitor-server.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor-nagios.cron
+install -D -m 644 nagios/monitor-nagios.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor-nagios.cron
# cron job for automated polling
install -D -m 644 monitor-server.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor-server.cron
chkconfig monitor on
%post runlevelagent
-chkconfig --add monitor-runlevelagent
-chkconfig monitor-runlevelagent on
-if [ "$PL_BOOTCD" != "1" ] ; then
- service monitor-runlevelagent restart
+if [ -f /etc/planetlab/node_id ] ; then
+ chkconfig --add monitor-runlevelagent
+ chkconfig monitor-runlevelagent on
+ if [ "$PL_BOOTCD" != "1" ] ; then
+ service monitor-runlevelagent restart
+ fi
fi