X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Monitor.spec;h=61fe0f18841019ac8a4aa9fbf0b2edc1166408ae;hb=43880652a0faf80ec6cf4dea4faae89d29022e81;hp=061f5acdac4329fee1fd8f184a05ac99a1a80d32;hpb=bb1a470db8cf37273a731af407e27ba1fcb285c6;p=monitor.git diff --git a/Monitor.spec b/Monitor.spec index 061f5ac..61fe0f1 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -50,7 +50,11 @@ Requires: mysql-server Requires: mysql-devel Requires: mysql-libs Requires: mailx +Requires: sendmail +Requires: php +Requires: httpd +Requires: cronie Requires: nagios Requires: nagios-common Requires: nagios-devel @@ -58,6 +62,8 @@ Requires: nagios-plugins-all Requires: ndoutils Requires: ndoutils-mysql +Requires: rt3 + %description nagios Scripts and setup necessary to integrate and monitor PLC with Nagios. @@ -156,8 +162,9 @@ install -d $RPM_BUILD_ROOT/%{python_sitearch}/monitor install -D -m 644 monitor.functions $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor.functions install -D -m 755 monitor-server.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor install -D -m 755 zabbix/monitor-zabbix.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/zabbix -# TODO: update with a real init file -install -D -m 755 monitor-server.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor-nagios + +install -D -m 755 nagios/monitor-nagios.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/monitor-nagios +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 @@ -174,12 +181,13 @@ rsync -a --exclude archive-pdb --exclude .cvsignore --exclude .svn --exclude CVS # install monitor python package rsync -a --exclude .svn ./monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/ +install -D -m 644 monitor/wrapper/plc.py $RPM_BUILD_ROOT/usr/share/%{name}/nagios/ +install -D -m 644 monitor/generic.py $RPM_BUILD_ROOT/usr/share/%{name}/nagios/ + # install third-party module to site-packages install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py # TODO: -echo " * TODO: Setting up Monitor account in local MyPLC" - #touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php #chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php @@ -204,7 +212,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %{_sysconfdir}/plc.d/monitor-nagios /usr/share/%{name}/nagios -# TODO: not sure how this will impact the server files +%{_sysconfdir}/cron.d/monitor-nagios.cron %files server %defattr(-,root,root) @@ -224,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT /usr/share/%{name}/monitor.functions /usr/share/%{name}/setup.py* /usr/share/%{name}/threadpool.py* +/usr/share/%{name}/zabbix.spec /usr/share/%{name}/bootcd /usr/share/%{name}/commands @@ -237,7 +246,6 @@ rm -rf $RPM_BUILD_ROOT /usr/share/%{name}/tools /usr/share/%{name}/upgrade /usr/share/%{name}/web -/usr/share/%{name}/web /usr/share/%{name}/zabbix #/var/www/cgi-bin/monitor @@ -316,6 +324,9 @@ fi %post nagios # TODO: do as much as possible to get the host setup and running. +#chkconfig --add monitor-nagios +#chkconfig monitor-nagios on +chkconfig mysqld on %post server # TODO: this will be nice when we have a web-based service running., such as