2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
#
|
|
|
|
#Pandora FMS Linux Agent
|
|
|
|
#
|
2009-09-18 20:45:44 +02:00
|
|
|
%define name pandorafms_agent_unix
|
2015-11-16 17:34:06 +01:00
|
|
|
%define version 6.1dev
|
2015-11-17 00:01:11 +01:00
|
|
|
%define release 151117
|
2010-12-28 17:27:59 +01:00
|
|
|
|
2009-09-18 20:45:44 +02:00
|
|
|
Summary: Pandora FMS Linux agent, PERL version
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
2010-12-28 17:27:59 +01:00
|
|
|
Release: %{release}
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
License: GPL
|
|
|
|
Vendor: ArticaST <http://www.artica.es>
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
URL: http://pandorafms.org
|
|
|
|
Group: System/Monitoring
|
2011-08-19 18:36:37 +02:00
|
|
|
Packager: Sancho Lerena <slerena@artica.es>
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
Prefix: /usr/share
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
2011-08-22 02:45:36 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd
|
2010-08-04 19:51:05 +02:00
|
|
|
Requires: coreutils unzip
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
AutoReq: 0
|
|
|
|
Provides: %{name}-%{version}
|
|
|
|
|
|
|
|
%description
|
2011-08-22 02:45:36 +02:00
|
|
|
Pandora FMS agent for unix. Pandora FMS is an OpenSource full-featured monitoring software.
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2009-09-18 20:45:44 +02:00
|
|
|
%setup -q -n unix
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_agent/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/pandora/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
2010-06-09 13:44:10 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
|
2009-09-18 20:45:44 +02:00
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
|
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
|
2010-12-27 11:18:20 +01:00
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
|
2010-05-20 15:09:50 +02:00
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
|
2010-06-09 13:29:23 +02:00
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/init.d/pandora_agent_daemon
|
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
|
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
2009-09-18 20:45:44 +02:00
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
|
|
|
|
|
2015-06-05 13:45:57 +02:00
|
|
|
#if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then
|
|
|
|
# rm $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec
|
|
|
|
#fi
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -Rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%pre
|
2011-08-22 02:45:36 +02:00
|
|
|
if [ "`id pandora | grep uid | wc -l`" = 0 ]
|
|
|
|
then
|
|
|
|
/usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora
|
|
|
|
fi
|
2015-10-20 12:01:53 +02:00
|
|
|
chown pandora:root /var/log/pandora
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
if [ ! -d /etc/pandora ] ; then
|
|
|
|
mkdir -p /etc/pandora
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f /usr/share/pandora_agent/pandora_agent.conf ] ; then
|
2010-11-15 11:32:23 +01:00
|
|
|
cp /usr/share/pandora_agent/pandora_agent.conf.rpmnew /usr/share/pandora_agent/pandora_agent.conf
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
fi
|
|
|
|
|
2009-09-18 20:45:44 +02:00
|
|
|
if [ ! -f /etc/pandora/pandora_agent.conf ] ; then
|
|
|
|
ln -s /usr/share/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf
|
|
|
|
else
|
|
|
|
ln -s /usr/share/pandora_agent/pandora_agent.conf.rpmnew /etc/pandora/pandora_agent.conf.rpmnew
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e /etc/pandora/plugins ]; then
|
|
|
|
ln -s /usr/share/pandora_agent/plugins /etc/pandora
|
|
|
|
fi
|
|
|
|
|
2010-07-20 12:45:55 +02:00
|
|
|
if [ ! -e /etc/pandora/collections ]; then
|
|
|
|
ln -s /usr/share/pandora_agent/collections /etc/pandora
|
|
|
|
fi
|
2015-11-02 16:52:30 +01:00
|
|
|
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
|
2010-07-20 12:45:55 +02:00
|
|
|
|
2009-11-19 20:26:08 +01:00
|
|
|
mkdir -p /var/spool/pandora/data_out
|
2010-02-10 18:37:48 +01:00
|
|
|
chkconfig pandora_agent_daemon on
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
|
2010-06-04 11:43:01 +02:00
|
|
|
# Upgrading
|
|
|
|
if [ "$1" = "1" ]; then
|
2010-11-15 11:32:23 +01:00
|
|
|
exit 0
|
2010-06-04 11:43:01 +02:00
|
|
|
fi
|
|
|
|
|
2010-02-10 18:37:48 +01:00
|
|
|
chkconfig --del pandora_agent_daemon
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
/etc/init.d/pandora_agent_daemon stop
|
|
|
|
rm /etc/init.d/pandora_agent_daemon
|
|
|
|
/usr/sbin/userdel pandora
|
|
|
|
rm -Rf /etc/pandora/pandora_agent.conf
|
|
|
|
rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
|
2009-09-18 20:45:44 +02:00
|
|
|
rm -Rf /usr/share/pandora_agent
|
2010-06-09 13:29:23 +02:00
|
|
|
rm -Rf /usr/share/man/man1/pandora_agent.1.gz
|
|
|
|
rm -Rf /usr/share/man/man1/tentacle_client.1.gz
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
exit 0
|
|
|
|
|
2015-11-02 16:52:30 +01:00
|
|
|
%postun
|
|
|
|
|
|
|
|
# Upgrading
|
|
|
|
if [ "$1" = "1" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -Rf /etc/logrotate.d/pandora_agent
|
|
|
|
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
%files
|
|
|
|
%defattr(750,pandora,root)
|
|
|
|
/usr/bin/pandora_agent
|
2010-12-27 11:18:20 +01:00
|
|
|
/usr/bin/pandora_agent_exec
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|
|
|
|
%defattr(755,pandora,root)
|
|
|
|
/usr/bin/tentacle_client
|
|
|
|
/etc/init.d/pandora_agent_daemon
|
|
|
|
%docdir %{prefix}/pandora_agents/docs
|
|
|
|
%{prefix}/pandora_agent
|
|
|
|
|
2010-06-09 13:29:23 +02:00
|
|
|
%defattr(644,pandora,root)
|
|
|
|
/usr/share/man/man1/pandora_agent.1.gz
|
|
|
|
/usr/share/man/man1/tentacle_client.1.gz
|
2009-09-14 Ramon Novoa <rnovoa@artica.es>
* unix, unix/pandora_agent_installer,
unix/plugins, unix/pandora_agent,
unix/pandora_agent_daemon, unix/AUTHORS,
unix/pandora_agent.conf, unix/COPYING,
unix/pandora_agent.spec, unix/tentacle_client,
unix/README: Added to repository. Generic Pandora FMS Unix agent
written in PERL. The skeleton files where copied from the linux
subdirectory.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1940 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-14 17:57:00 +02:00
|
|
|
|