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
|
2012-06-21 Ramon Novoa <rnovoa@artica.es>
* win32/bin/pandora_agent.conf,
win32/installer/pandora.mpi,
win32/versioninfo.rc,
win32/pandora.cc,
pc/AIX/pandora_agent.conf,
pc/Linux/pandora_agent.conf,
pc/HP-UX/pandora_agent.conf,
pc/Win32/pandora_agent.conf,
pc/NT4/pandora_agent.conf,
pc/SunOS/pandora_agent.conf,
pc/FreeBSD/pandora_agent.conf,
unix/AIX/pandora_agent.conf,
unix/DEBIAN/control,
unix/DEBIAN/make_deb_package.sh,
unix/pandora_agent.spec,
unix/Linux/pandora_agent.conf,
unix/HP-UX/pandora_agent.conf,
unix/pandora_agent.redhat.spec,
unix/pandora_agent,
unix/NT4/pandora_agent.conf,
unix/SunOS/pandora_agent.conf,
unix/FreeBSD/pandora_agent.conf,
shellscript/linux/pandora_agent.conf,
shellscript/bsd-ipso/pandora_agent.conf,
shellscript/aix/pandora_agent.conf,
shellscript/hp-ux/pandora_agent.conf,
shellscript/mac_osx/pandora_agent.conf,
shellscript/solaris/pandora_agent.conf,
shellscript/openWRT/pandora_agent.conf: Updated version strings.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6672 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-06-21 19:41:54 +02:00
|
|
|
%define version 5.0dev
|
2010-12-28 17:27:59 +01:00
|
|
|
%define release 1
|
|
|
|
|
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
|
|
|
|
BuildRequires: sysvinit cron rsyslog sysconfig
|
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
|
|
|
|
|
|
|
# Checking old config file (if exists)
|
|
|
|
if [ -f /etc/pandora/pandora_agent.conf ] ; then
|
2009-09-18 20:45:44 +02:00
|
|
|
mv /etc/pandora/pandora_agent.conf /etc/pandora/pandora_agent.conf.backup
|
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
|
|
|
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/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
|
|
|
if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then
|
2010-11-15 11:32:23 +01:00
|
|
|
rm $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec
|
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
|
|
|
|
|
|
|
|
%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
|
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
|
|
|
|
|
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
|
|
|
|
|
|
|
|
%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(770,pandora,root)
|
|
|
|
/var/log/pandora/
|
|
|
|
|
|
|
|
%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
|
|
|
|