2014-02-24 02:08:19 +01:00
|
|
|
Name: pandorafms-agent
|
|
|
|
Version: 5.0
|
|
|
|
Release: 140223.sp3%{?dist}
|
|
|
|
Summary: Host/service/network agent for Pandora FMS monitoring system
|
|
|
|
License: GPLv2
|
|
|
|
Vendor: Artica <http://www.artica.es>
|
|
|
|
Source: http://code.pandorafms.com/static_download/pandorafms_agent_unix-5.0SP3.tar.gz
|
|
|
|
#Source: %{name}-%{version}.tar.gz
|
|
|
|
#Source0: http://code.pandorafms.com/static_download/pandorafms_agent_unix-5.0SP3.tar.gz
|
|
|
|
URL: http://pandorafms.com
|
|
|
|
Group: Applications/System
|
|
|
|
#Prefix: /usr/share
|
|
|
|
#BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires(pre): /bin/sed /bin/grep
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires: coreutils unzip
|
|
|
|
Requires(preun): initscripts, chkconfig
|
|
|
|
Requires(post): initscripts, chkconfig
|
|
|
|
Requires(postun): initscripts
|
2014-02-01 19:18:04 +01:00
|
|
|
|
|
|
|
%description
|
2014-02-24 02:08:19 +01:00
|
|
|
Pandora FMS agent for unix. Pandora FMS is a full-featured monitoring software.
|
2014-02-01 19:18:04 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n unix
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
2014-02-24 02:08:19 +01:00
|
|
|
rm -rf %{buildroot}
|
|
|
|
mkdir -p %{buildroot}/usr/bin/
|
|
|
|
mkdir -p %{buildroot}/etc/pandora/
|
|
|
|
mkdir -p %{buildroot}/etc/init.d/
|
|
|
|
mkdir -p %{buildroot}/var/log/pandora/
|
|
|
|
mkdir -p %{buildroot}/usr/share/man/man1/
|
|
|
|
|
|
|
|
install -m 0755 pandora_agent %{buildroot}%{_bindir}/pandora_agent
|
|
|
|
install -m 0755 pandora_agent_exec %{buildroot}%{_bindir}/pandora_agent_exec
|
|
|
|
install -m 0755 tentacle_client %{buildroot}%{_bindir}/tentacle_client
|
|
|
|
install -m 0755 pandora_agent_daemon %{buildroot}/etc/init.d/pandora_agent_daemon
|
|
|
|
install -m 0644 man/man1/pandora_agent.1.gz %{buildroot}/usr/share/man/man1/pandora_agent.1.gz
|
|
|
|
install -m 0644 man/man1/tentacle_client.1.gz %{buildroot}/usr/share/man/man1/tentacle_client.1.gz
|
|
|
|
install -m 0600 Linux/pandora_agent.conf %{buildroot}/etc/pandora/pandora_agent.conf
|
|
|
|
install -d -m 0755 %{buildroot}/etc/pandora/plugins
|
|
|
|
install -d -m 0755 %{buildroot}/etc/pandora/collections
|
|
|
|
|
|
|
|
# Copying all plugins inside plugin directory and set 755 perms on them
|
|
|
|
cp plugins/* %{buildroot}/etc/pandora/plugins
|
|
|
|
chmod 755 %{buildroot}/etc/pandora/plugins/*
|
2014-02-01 19:18:04 +01:00
|
|
|
|
|
|
|
%clean
|
2014-02-24 02:08:19 +01:00
|
|
|
rm -Rf %{buildroot}
|
2014-02-01 19:18:04 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
getent passwd pandora >/dev/null || \
|
2014-02-24 02:08:19 +01:00
|
|
|
/usr/sbin/useradd -d /etc/pandora -s /bin/false -M -g 0 pandora
|
2014-02-01 19:18:04 +01:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
2014-02-24 02:08:19 +01:00
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
# Initial installation. Needed to start pandora agent
|
|
|
|
mkdir -p /var/spool/pandora/data_out
|
|
|
|
/sbin/chkconfig --add pandora_agent_daemon
|
|
|
|
/sbin/chkconfig pandora_agent_daemon on
|
2014-02-01 19:18:04 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
2014-02-24 02:08:19 +01:00
|
|
|
# package removal, not upgrade
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
/sbin/chkconfig --del pandora_agent_daemon
|
|
|
|
/etc/init.d/pandora_agent_daemon stop
|
|
|
|
/usr/sbin/userdel pandora
|
|
|
|
rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
|
2014-02-01 19:18:04 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(750,pandora,root)
|
|
|
|
/usr/bin/pandora_agent
|
|
|
|
/usr/bin/pandora_agent_exec
|
2014-02-24 02:08:19 +01:00
|
|
|
/usr/bin/tentacle_client
|
|
|
|
/etc/init.d/pandora_agent_daemon
|
2014-02-01 19:18:04 +01:00
|
|
|
|
|
|
|
%defattr(-,pandora,root,770)
|
|
|
|
/var/log/pandora/
|
|
|
|
|
2014-02-24 02:08:19 +01:00
|
|
|
%defattr(600,pandora,root)
|
|
|
|
/etc/pandora/pandora_agent.conf
|
|
|
|
/etc/pandora/collections
|
|
|
|
/etc/pandora/plugins
|
2014-02-01 19:18:04 +01:00
|
|
|
|
2014-02-24 02:08:19 +01:00
|
|
|
%config /etc/pandora/pandora_agent.conf
|
|
|
|
|
|
|
|
%doc
|
2014-02-01 19:18:04 +01:00
|
|
|
/usr/share/man/man1/pandora_agent.1.gz
|
|
|
|
/usr/share/man/man1/tentacle_client.1.gz
|
|
|
|
|
|
|
|
%changelog
|
2014-02-24 02:08:19 +01:00
|
|
|
* Sun Feb 23 2014 Sancho Lerena <slerena at gmail.com> - 5.0
|
|
|
|
- Several changes on SPEC to comply with Fedora standards. This one pass rpmlint
|
|
|
|
|
|
|
|
* Sat Feb 01 2014 Sancho Lerena <slerena at gmail.com> - 5.0
|
2014-02-01 19:18:04 +01:00
|
|
|
- First version, after re-re-re-reading the fedora contributor guidelines :)
|