2009-12-18 Sancho Lerena <slerena@artica.es>

* pandora_server.spec: Added xprobe2 dep (we made the xprobe2 rpm package
	so now it's possible to satisfy dependency). Alter all paths to binary from
	/usr/local/bin to /usr/bin. Other minor issues in RPM fixed.

	* pandora_server_installer: Added description to get deps from zypper and yum.
	Installing services in debian/ubunty systems with update-rc.d. 
	Make check to link from /usr/local/bin to /usr/bin if install
	deploy binary at /usr/local. /usr/bin is the new default.

	* pandora_server_upgrade: /usr/bin as new default. Link issue fixed.

	* DEBIAN/make_deb_package.sh: Fixed Makefile replace regexp to replace all 
	target binary to put then in the jail under /usr/bin path.

	* DEBIAN/postinst: Fixed path for tentacle_server at /usr/bin

	* DEBIAN/prerm: Using native debian commands to remove services.

	* Tools.pm: If there is a problem loading something in the enterprise, show it
	to log.

	* util/pandora_server,
	util/tentacle_serverd: new path to /usr/bin/
	
	* pandora_server.conf: new path for pandora_exec to /usr/bin/

	* util/plugin/udp_nmap_plugin.sh: Check parameters before calling to namp.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2220 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-12-18 18:22:33 +00:00
parent 4551bb4669
commit aa3a4a0b90
13 changed files with 117 additions and 58 deletions

View File

@ -1,3 +1,33 @@
2009-12-18 Sancho Lerena <slerena@artica.es>
* pandora_server.spec: Added xprobe2 dep (we made the xprobe2 rpm package
so now it's possible to satisfy dependency). Alter all paths to binary from
/usr/local/bin to /usr/bin. Other minor issues in RPM fixed.
* pandora_server_installer: Added description to get deps from zypper and yum.
Installing services in debian/ubunty systems with update-rc.d.
Make check to link from /usr/local/bin to /usr/bin if install
deploy binary at /usr/local. /usr/bin is the new default.
* pandora_server_upgrade: /usr/bin as new default. Link issue fixed.
* DEBIAN/make_deb_package.sh: Fixed Makefile replace regexp to replace all
target binary to put then in the jail under /usr/bin path.
* DEBIAN/postinst: Fixed path for tentacle_server at /usr/bin
* DEBIAN/prerm: Using native debian commands to remove services.
* Tools.pm: If there is a problem loading something in the enterprise, show it
to log.
* util/pandora_server,
util/tentacle_serverd: new path to /usr/bin/
* pandora_server.conf: new path for pandora_exec to /usr/bin/
* util/plugin/udp_nmap_plugin.sh: Check parameters before calling to namp.
2009-12-18 Raul Mateos <raulofpandora@gmail.com> 2009-12-18 Raul Mateos <raulofpandora@gmail.com>
* pandora_dbstress.pl, pandora_db.pl: Clean code, updated year. * pandora_dbstress.pl, pandora_db.pl: Clean code, updated year.

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_console_version="3.0.0." pandora_console_version="3.0.0"
echo "This script to make deb must run as root (because the dh-make-perl need this). Then test if you are root." echo "This script to make deb must run as root (because the dh-make-perl need this). Then test if you are root."
if [ `id -u` != 0 ] if [ `id -u` != 0 ]
@ -46,20 +46,31 @@ mkdir -p temp_package/etc/pandora
mkdir -p temp_package/etc/init.d/ mkdir -p temp_package/etc/init.d/
mkdir -p temp_package/etc/logrotate.d mkdir -p temp_package/etc/logrotate.d
mkdir -p temp_package/usr/share/pandora_server mkdir -p temp_package/usr/share/pandora_server
mkdir -p temp_package/usr/local/bin mkdir -p temp_package/usr/bin
echo "Make the perl of Pandora Server." echo "Make the perl of Pandora Server."
perl Makefile.PL perl Makefile.PL
make make
# Adjust Makefile to use our "fake" root dir to install libraries and also binaries"
cat Makefile | sed -e "s/PREFIX = \/usr/PREFIX = temp_package\/usr/" > Makefile.temp cat Makefile | sed -e "s/PREFIX = \/usr/PREFIX = temp_package\/usr/" > Makefile.temp
# This is needed to create .DEB in OpenSUSE.
cat Makefile.temp | sed -e "s/INSTALLBIN = .*/INSTALLBIN = temp_package\/usr\/bin/" > Makefile
cat Makefile | sed -e "s/INSTALLSITEBIN = .*/INSTALLSITEBIN = temp_package\/usr\/bin/" > Makefile.temp
cat Makefile.temp | sed -e "s/INSTALLVENDORBIN = .*/INSTALLVENDORBIN = temp_package\/usr\/bin/" > Makefile
cat Makefile | sed -e "s/INSTALLSCRIPT = .*/INSTALLSCRIPT = temp_package\/usr\/bin/" > Makefile.temp
cat Makefile.temp | sed -e "s/INSTALLSITESCRIPT = .*/INSTALLSITESCRIPT = temp_package\/usr\/bin/" > Makefile
cat Makefile | sed -e "s/INSTALLVENDORSCRIPT = .*/INSTALLVENDORSCRIPT = temp_package\/usr\/bin/" > Makefile.temp
mv Makefile.temp Makefile mv Makefile.temp Makefile
rm Makefile.temp
make install make install
echo "Copy other files in fake file." echo "Copy other files in fake file."
cp util/pandora_logrotate temp_package/etc/logrotate.d/pandora cp util/pandora_logrotate temp_package/etc/logrotate.d/pandora
cp bin/tentacle_server temp_package/usr/local/bin cp bin/tentacle_server temp_package/usr/bin
cp util/tentacle_serverd temp_package/etc/init.d/tentacle_serverd cp util/tentacle_serverd temp_package/etc/init.d/tentacle_serverd
cp conf/pandora_server.conf temp_package/etc/pandora/ cp conf/pandora_server.conf temp_package/etc/pandora/

View File

@ -60,7 +60,7 @@ echo "Creating common Pandora FMS directories"
useradd pandora 2> /dev/null useradd pandora 2> /dev/null
mkdir -p /home/pandora/.ssh 2> /dev/null mkdir -p /home/pandora/.ssh 2> /dev/null
chown -R pandora:root /home/pandora chown -R pandora:root /home/pandora
chmod 755 /usr/local/bin/tentacle_server chmod 755 /usr/bin/tentacle_server
echo "Giving proper permission to /var/spool/pandora" echo "Giving proper permission to /var/spool/pandora"
chown -R pandora /var/spool/pandora/ chown -R pandora /var/spool/pandora/

View File

@ -60,10 +60,10 @@ rm /etc/pandora/pandora_server.conf
GET_DISTRO="`get_distro`" GET_DISTRO="`get_distro`"
DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"` DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"`
rm /etc/init.d/pandora_server rm /etc/init.d/pandora_server
rm /etc/rc2.d/S90pandora_server rm /etc/init.d/tentacle_serverd
rm /etc/init.d/tentacle_serverd update-rc.d pandora_server remove
rm /etc/rc2.d/S80tentacle_serverd update-rc.d tentacle_serverd remove
if [ -d /etc/cron.daily ] if [ -d /etc/cron.daily ]
then then

View File

@ -4,7 +4,7 @@ use ExtUtils::MakeMaker;
WriteMakefile( WriteMakefile(
NAME => 'PandoraFMS', NAME => 'PandoraFMS',
VERSION_FROM => 'lib/PandoraFMS/Config.pm', VERSION_FROM => 'lib/PandoraFMS/Config.pm',
AUTHOR => 'Artica ST <info@artica.es>', AUTHOR => 'Artica ST <info@artica.es>',
PREREQ_PM => { PREREQ_PM => {
NetAddr::IP => 0, NetAddr::IP => 0,
DBI => 0, DBI => 0,

View File

@ -85,9 +85,9 @@ reconserver 1
# DISABLED BY DEFAULT # DISABLED BY DEFAULT
pluginserver 0 pluginserver 0
# Pandora FMS Plugin exec tool filepath (by default at /usr/local/bin) # Pandora FMS Plugin exec tool filepath (by default at /usr/bin)
plugin_exec /usr/local/bin/pandora_exec plugin_exec /usr/bin/pandora_exec
# predictionserver : 1 or 0. Set to 1 to activate prediction server with this setup # predictionserver : 1 or 0. Set to 1 to activate prediction server with this setup
# DISABLED BY DEFAULT # DISABLED BY DEFAULT

View File

@ -334,7 +334,8 @@ sub enterprise_load ($) {
#return 1 if (is_loaded ('PandoraFMS::Enterprise')); #return 1 if (is_loaded ('PandoraFMS::Enterprise'));
# Try to load the module # Try to load the module
eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;'; # eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;';
eval 'require PandoraFMS::Enterprise;';
# Ops # Ops
return 0 if ($@); return 0 if ($@);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 3.0.0 %define version 3.0.0
%define release 2 %define release 4
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}
@ -23,7 +23,7 @@ AutoReq: 0
Provides: %{name}-%{version} Provides: %{name}-%{version}
Requires: perl-Mail-Sendmail perl-DBI perl-DBD-mysql perl-time-format Requires: perl-Mail-Sendmail perl-DBI perl-DBD-mysql perl-time-format
Requires: perl-NetAddr-IP net-snmp net-tools Requires: perl-NetAddr-IP net-snmp net-tools
Requires: nmap wmic sudo Requires: nmap wmic sudo xprobe2
%description %description
Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments.
@ -46,8 +46,6 @@ export perl_version=5.10.0
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin/ mkdir -p $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/usr/local
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
mkdir -p $RPM_BUILD_ROOT/usr/sbin/ mkdir -p $RPM_BUILD_ROOT/usr/sbin/
mkdir -p $RPM_BUILD_ROOT/etc/init.d/ mkdir -p $RPM_BUILD_ROOT/etc/init.d/
mkdir -p $RPM_BUILD_ROOT/etc/pandora/ mkdir -p $RPM_BUILD_ROOT/etc/pandora/
@ -58,10 +56,10 @@ mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/$perl_version/ mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/$perl_version/
# All binaries go to /usr/local/bin # All binaries go to /usr/bin
cp -aRf bin/pandora_server $RPM_BUILD_ROOT/usr/local/bin/ cp -aRf bin/pandora_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf bin/pandora_exec $RPM_BUILD_ROOT/usr/local/bin/ cp -aRf bin/pandora_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf bin/tentacle_server $RPM_BUILD_ROOT/usr/local/bin/ cp -aRf bin/tentacle_server $RPM_BUILD_ROOT/usr/bin/
cp -aRf conf/* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ cp -aRf conf/* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/ cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
@ -73,13 +71,19 @@ cp -aRf util/tentacle_serverd $RPM_BUILD_ROOT/etc/init.d/
%clean %clean
rm -fr $RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT
%pre %pre
/usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora /usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora
if [ -e "/etc/pandora/pandora_server.conf" ]
then
cat /etc/pandora/pandora_server.conf > /etc/pandora/pandora_server.conf.old
fi
exit 0 exit 0
%post %post
chkconfig -s pandora_server on chkconfig -s pandora_server on
chkconfig -s tentacle_serverd on chkconfig -s tentacle_serverd on
echo "/usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" > /etc/cron.daily/pandora_db echo "/usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" > /etc/cron.daily/pandora_db
chmod 750 /etc/cron.daily/pandora_db chmod 750 /etc/cron.daily/pandora_db
cp -aRf /usr/share/pandora_server/util/pandora_logrotate /etc/logrotate.d/pandora cp -aRf /usr/share/pandora_server/util/pandora_logrotate /etc/logrotate.d/pandora
@ -114,8 +118,7 @@ rm -Rf /usr/lib/perl5/site_perl/%{perl_version}/PandoraFMS/
rm -Rf /etc/pandora/pandora_server.conf rm -Rf /etc/pandora/pandora_server.conf
rm -Rf /var/spool/pandora rm -Rf /var/spool/pandora
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd
rm -Rf /usr/local/bin/pandora_exec /usr/local/bin/pandora_server rm -Rf /usr/bin/pandora_exec /usr/bin/pandora_server /usr/bin/tentacle_server
rm -Rf /usr/local/bin/tentacle_server
rm -Rf /etc/cron.daily/pandora_db rm -Rf /etc/cron.daily/pandora_db
rm -Rf /etc/logrotate.d/pandora rm -Rf /etc/logrotate.d/pandora
@ -126,9 +129,9 @@ rm -Rf /etc/logrotate.d/pandora
/etc/init.d/tentacle_serverd /etc/init.d/tentacle_serverd
%defattr(755,pandora,root) %defattr(755,pandora,root)
/usr/local/bin/pandora_exec /usr/bin/pandora_exec
/usr/local/bin/pandora_server /usr/bin/pandora_server
/usr/local/bin/tentacle_server /usr/bin/tentacle_server
%defattr(755,pandora,root) %defattr(755,pandora,root)
/usr/lib/perl5/site_perl/%{perl_version}/PandoraFMS/ /usr/lib/perl5/site_perl/%{perl_version}/PandoraFMS/

View File

@ -88,11 +88,17 @@ install () {
echo "The complete installation guide is at: "http://www.openideas.info/wiki/index.php?title=Pandora_2.0:Documentation_en:Install_Server#Pandora_FMS_Server_installation" " echo "The complete installation guide is at: "http://www.openideas.info/wiki/index.php?title=Pandora_2.0:Documentation_en:Install_Server#Pandora_FMS_Server_installation" "
echo " " echo " "
echo "Debian-based distribution do:" echo "Debian-based distribution do:"
echo " $ apt-get install snmp snmpd libtime-format-perl libxml-simple-perl libnetaddr-ip-perl libdbi-perl libxml-simple-perl libnetaddr-ip-perl libhtml-parser-perl wmi-client xprobe2 libmail-sendmail-perl" echo " # apt-get install snmp snmpd libtime-format-perl libxml-simple-perl libnetaddr-ip-perl libdbi-perl libxml-simple-perl libnetaddr-ip-perl libhtml-parser-perl wmi-client xprobe2 libmail-sendmail-perl"
echo " " echo " "
echo "RPM distribution do" echo "For CentOS / RHEL do: "
echo " " echo " "
echo " $ yum perl-XML-SAX* perl-Tie* perl-XML-Simple* perl-IO-Socket* perl-Time-modules* perl-NetAddr-IP* perl-DateTime* perl-ExtUtils perl-DBI" echo " # yum install perl-XML-SAX* perl-Tie* perl-XML-Simple* perl-IO-Socket* perl-Time-modules* perl-NetAddr-IP* perl-DateTime* perl-ExtUtils perl-DBI nmap xprobe2"
echo " "
echo "For OpenSUSE / SLES do : "
echo " "
echo " # zypper install install nmap perl-DBD-mysql perl-DBI perl-Date-Calc perl-HTML-Parser
perl-HTML-Encoding perl-HTML-Tree perl-IO-Socket-Multicast perl-Mail-Sendmail perl-NetAddr-IP
perl-TimeDate perl-XML-Simple perl-libwww-perl mysql-client"
echo " " echo " "
echo " You also will need to install xprobe2 and wmiclient from rpm (download from our website)" echo " You also will need to install xprobe2 and wmiclient from rpm (download from our website)"
echo " " echo " "
@ -121,6 +127,18 @@ install () {
make make
make install make install
echo "Checking binaries at /usr/local/bin -> /usr/bin"
if [ ! -e "/usr/bin/pandora_server" ]
then
if [ ! -e "/usr/local/bin/pandora_server" ]
then
echo "ERROR compiling Pandora FMS Server from sources. Aborting"
exit 1
fi
ln -s /usr/local/bin/pandora_server /usr/bin
ln -s /usr/local/bin/pandora_exec /usr/bin
fi
echo "Creating common Pandora FMS directories" echo "Creating common Pandora FMS directories"
id pandora id pandora
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -145,8 +163,8 @@ install () {
mkdir $PANDORA_SPOOL/data_in 2> /dev/null mkdir $PANDORA_SPOOL/data_in 2> /dev/null
mkdir $PANDORA_SPOOL/data_in/conf 2> /dev/null mkdir $PANDORA_SPOOL/data_in/conf 2> /dev/null
mkdir $PANDORA_SPOOL/data_in/md5 2> /dev/null mkdir $PANDORA_SPOOL/data_in/md5 2> /dev/null
mkdir $PANDORA_LOG 2> /dev/null mkdir $PANDORA_LOG 2> /dev/null
echo "Giving proper permission to /var/spool/pandora" echo "Giving proper permission to /var/spool/pandora"
id -g www-data > /dev/null id -g www-data > /dev/null
if [ $? -eq 0 ] if [ $? -eq 0 ]
@ -187,14 +205,11 @@ install () {
echo "Copying the daemon script into /etc/init.d/pandora_server" echo "Copying the daemon script into /etc/init.d/pandora_server"
cp util/pandora_server /etc/init.d/ cp util/pandora_server /etc/init.d/
if [ "$DISTRO" == "UBUNTU" ] if [ "$DISTRO" == "UBUNTU" ] || [ "$DISTRO" == "DEBIAN" ]
then then
echo "Linking startup script to /etc/rc2.d" echo "Linking startup script to /etc/rc2.d"
ln -s $PANDORA_SERVER /etc/rc2.d/S90pandora_server update-rc.d pandora_server defaults
echo "Linking stop daemon scripts";
ln -s $PANDORA_SERVER /etc/rc0.d/K90pandora_server
ln -s $PANDORA_SERVER /etc/rc1.d/K90pandora_server
ln -s $PANDORA_SERVER /etc/rc6.d/K90pandora_server
else else
if [ "$DISTRO" == "SUSE" ] if [ "$DISTRO" == "SUSE" ]
then then
@ -224,34 +239,31 @@ install () {
then then
if [ "$SECOPT" != "--no-tentacle" ] if [ "$SECOPT" != "--no-tentacle" ]
then then
if [ "$DISTRO" == "UBUNTU" ] if [ "$DISTRO" == "UBUNTU" ] || [ "$DISTRO" == "DEBIAN" ]
then then
# Tentacle server install (Ubuntu) # Tentacle server install (Ubuntu)
echo "Installing tentacle server in /etc/rc2.d/S80tentacle_serverd" echo "Installing tentacle server"
cp bin/tentacle_server /usr/local/bin cp bin/tentacle_server /usr/bin
cp util/tentacle_serverd $TENTACLE_SERVER cp util/tentacle_serverd $TENTACLE_SERVER
ln -s $TENTACLE_SERVER /etc/rc2.d/S80tentacle_serverd update-rc.d tentacle_serverd defaults
ln -s $TENTACLE_SERVER /etc/rc0.d/K80tentacle_serverd
ln -s $TENTACLE_SERVER /etc/rc1.d/K80tentacle_serverd
ln -s $TENTACLE_SERVER /etc/rc6.d/K80tentacle_serverd
else else
if [ "$DISTRO" == "SUSE" ] if [ "$DISTRO" == "SUSE" ]
then then
echo "Creating Tentacle startup daemon" echo "Creating Tentacle startup daemon"
cp bin/tentacle_server /usr/local/bin cp bin/tentacle_server /usr/bin
cp util/tentacle_serverd /etc/init.d/tentacle_serverd cp util/tentacle_serverd /etc/init.d/tentacle_serverd
insserv tentacle_serverd insserv tentacle_serverd
else else
# Tentacle server install (Other Distros) # Tentacle server install (Other Distros)
echo "Installing tentacle server in /etc/rc.d/rc$INITLV.d/S80tentacle_serverd" echo "Installing tentacle server in /etc/rc.d/rc$INITLV.d/S80tentacle_serverd"
cp bin/tentacle_server /usr/local/bin cp bin/tentacle_server /usr/bin
cp util/tentacle_serverd /etc/init.d/tentacle_serverd cp util/tentacle_serverd /etc/init.d/tentacle_serverd
ln -s $TENTACLE_SERVER /etc/rc.d/rc$INITLV.d/S80tentacle_serverd ln -s $TENTACLE_SERVER /etc/rc.d/rc$INITLV.d/S80tentacle_serverd
fi fi
fi fi
fi fi
fi fi
echo "Creating Pandora FMS distribution directory in /usr/share/pandora_server" echo "Creating Pandora FMS distribution directory in /usr/share/pandora_server"
mkdir $PANDORA_HOME 2> /dev/null mkdir $PANDORA_HOME 2> /dev/null
cp -R util $PANDORA_HOME cp -R util $PANDORA_HOME
@ -300,12 +312,12 @@ uninstall () {
rm -Rf $PANDORA_LOG 2> /dev/null rm -Rf $PANDORA_LOG 2> /dev/null
rm -Rf $PANDORA_CFG_FILE 2> /dev/null rm -Rf $PANDORA_CFG_FILE 2> /dev/null
rm -Rf $PANDORA_SERVER 2> /dev/null rm -Rf $PANDORA_SERVER 2> /dev/null
rm -Rf /usr/local/bin/pandora_server 2> /dev/null
rm -Rf /usr/bin/pandora_server 2> /dev/null rm -Rf /usr/bin/pandora_server 2> /dev/null
rm -Rf /usr/bin/pandora_exec 2> /dev/null
rm -Rf $PANDORA_HOME rm -Rf $PANDORA_HOME
rm -Rf /etc/cron.daily/pandora_db rm -Rf /etc/cron.daily/pandora_db
rm -Rf /etc/logrotate.d/pandora rm -Rf /etc/logrotate.d/pandora
if [ "$DISTRO" == "UBUNTU" ] if [ "$DISTRO" == "UBUNTU" ] || [ "$DISTRO" == "DEBIAN" ]
then then
update-rc.d -f pandora_server remove update-rc.d -f pandora_server remove
update-rc.d -f tentacle_serverd remove update-rc.d -f tentacle_serverd remove

View File

@ -4,7 +4,7 @@
# Linux Version (generic), for SuSe and Debian/Ubuntu only # Linux Version (generic), for SuSe and Debian/Ubuntu only
# other Linux distros could not work properly without modifications # other Linux distros could not work properly without modifications
# Please see http://www.pandorafms.org # Please see http://www.pandorafms.org
# v3.0.1 Build 091216 # v3.0.1 Build 091218
# This code is licensed under GPL 2.0 license. # This code is licensed under GPL 2.0 license.
# ********************************************************************** # **********************************************************************
@ -29,14 +29,11 @@ install () {
echo "Copying utilities...." echo "Copying utilities...."
cp -R util /usr/share/pandora_server cp -R util /usr/share/pandora_server
cp bin/pandora_exec /usr/local/bin cp bin/pandora_exec /usr/bin
echo "Rebuilding links /usr/local/bin -> /usr/bin" echo "Rebuilding links /usr/local/bin -> /usr/bin"
rm /usr/bin/pandora_server rm /usr/local/bin/pandora_server 2> /dev/null
rm /usr/bin/pandora_exec rm /usr/local/bin/pandora_exec 2> /dev/null
ln -s /usr/local/bin/pandora_server /usr/bin
ln -s /usr/local/bin/pandora_exec /usr/bin
ln -s /usr/local/bin/tentacle_server /usr/bin
if [ -d /etc/logrotate.d ]; then if [ -d /etc/logrotate.d ]; then
echo "Creating logrotate.d entry for Pandora FMS log management" echo "Creating logrotate.d entry for Pandora FMS log management"

View File

@ -23,7 +23,7 @@
# this script to another name, editing PANDORA_HOME to the new .conf # this script to another name, editing PANDORA_HOME to the new .conf
export PANDORA_HOME="/etc/pandora/pandora_server.conf" export PANDORA_HOME="/etc/pandora/pandora_server.conf"
export PANDORA_DAEMON=/usr/local/bin/pandora_server export PANDORA_DAEMON=/usr/bin/pandora_server
# Uses a wait limit before sending a KILL signal, before trying to stop # Uses a wait limit before sending a KILL signal, before trying to stop
# Pandora FMS server nicely. Some big systems need some time before close # Pandora FMS server nicely. Some big systems need some time before close

View File

@ -49,6 +49,11 @@ while getopts ":hp:t:" optname
esac esac
done done
if [ -z "$PORT" ] || [ -z "$HOST" ]
then
help
fi
# execution # execution
nmap -T5 -p $PORT -sU $HOST | grep open | wc -l 2> /dev/null nmap -T5 -p $PORT -sU $HOST | grep open | wc -l 2> /dev/null

View File

@ -42,7 +42,7 @@ PANDORA_SERVER_PATH="/var/spool/pandora/data_in"
# Tentacle server settings # Tentacle server settings
TENTACLE_DAEMON="tentacle_server" TENTACLE_DAEMON="tentacle_server"
TENTACLE_PATH="/usr/local/bin" TENTACLE_PATH="/usr/bin"
TENTACLE_USER="pandora" TENTACLE_USER="pandora"
TENTACLE_ADDR="0.0.0.0" TENTACLE_ADDR="0.0.0.0"