Merge branch 'ent-12042-16242-cambiar-el-uso-de-chkconfig-para-dependencias-de-agentes-en-rhel9' into 'develop'
remove chkconfig from redhat9 agent See merge request artica/pandorafms!6898
This commit is contained in:
commit
ab706be7e3
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.775';
|
||||
use constant AGENT_BUILD => '240205';
|
||||
use constant AGENT_BUILD => '240126';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -13,23 +13,22 @@ Name: %{name}
|
|||
Version: %{version}
|
||||
Release: %{release}
|
||||
License: GPL
|
||||
Vendor: ArticaST <http://www.artica.es>
|
||||
Vendor: PandoraFMS <https://pandorafms.com>
|
||||
Source0: %{source_name}-%{version}.tar.gz
|
||||
URL: http://pandorafms.org
|
||||
URL: https://pandorafms.com
|
||||
Group: System/Monitoring
|
||||
Packager: Sancho Lerena <slerena@artica.es>
|
||||
Packager: PandoraFMS <info@pandorafms.com>
|
||||
Prefix: /usr/share
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||
BuildArch: x86_64
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig /bin/ln
|
||||
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
|
||||
Requires(post): /bin/ln
|
||||
Requires(preun): /bin/rm /usr/sbin/userdel
|
||||
Requires: coreutils unzip
|
||||
Requires: util-linux procps grep
|
||||
Requires: /sbin/ip /bin/awk
|
||||
Requires: perl-interpreter
|
||||
Requires: perl-IO-Compress
|
||||
Requires: libnsl
|
||||
Requires: libxcrypt-compat
|
||||
AutoReq: 0
|
||||
Provides: %{name}-%{version}
|
||||
|
@ -50,7 +49,7 @@ 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/rc.d/init.d/
|
||||
#mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
|
||||
|
@ -58,7 +57,7 @@ cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
|
|||
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/
|
||||
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
|
||||
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
|
||||
#cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/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/
|
||||
|
||||
|
@ -119,21 +118,11 @@ then
|
|||
cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
|
||||
chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
|
||||
# Enable the services on SystemD
|
||||
systemctl daemon-reload
|
||||
systemctl enable pandora_agent_daemon.service
|
||||
else
|
||||
/sbin/chkconfig --add pandora_agent_daemon
|
||||
/sbin/chkconfig pandora_agent_daemon on
|
||||
fi
|
||||
|
||||
if [ "$1" -gt 1 ]
|
||||
then
|
||||
|
||||
echo "If Pandora Agent daemon was running with init.d script,"
|
||||
echo "please stop it manually and start the service with systemctl"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
%preun
|
||||
|
||||
# Upgrading
|
||||
|
@ -141,8 +130,7 @@ if [ "$1" = "1" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
/sbin/chkconfig --del pandora_agent_daemon
|
||||
/etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || :
|
||||
systemctl stop pandora_agent_daemon.service > /dev/null 2>&1 || :
|
||||
|
||||
# Remove symbolic links
|
||||
pushd /etc/pandora
|
||||
|
@ -162,7 +150,6 @@ exit 0
|
|||
%defattr(755,root,root)
|
||||
/usr/bin/pandora_agent_exec
|
||||
/usr/bin/tentacle_client
|
||||
/etc/rc.d/init.d/pandora_agent_daemon
|
||||
|
||||
%defattr(644,root,root)
|
||||
/usr/share/man/man1/pandora_agent.1.gz
|
||||
|
|
Loading…
Reference in New Issue