diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index fe8d438fa1..ec2cc89d14 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,4 +1,4 @@ -package: PandoraFMS-Server +package: PandoraFMS-Server-Enterprise Version: 3.0.0 Architecture: all Priority: optional @@ -6,5 +6,5 @@ Section: admin Installed-Size: 640 Maintainer: Miguel de Dios Homepage: http://pandorafms.org/ -Depends: perl (>= 5.8), libmail-sendmail-perl, libdbi-perl, libdbd-mysql-perl,libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo -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. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server. +Depends: pandorafms-server, libio-socket-multicast-perl +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. diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 3dc0c2d452..56b2fa7b1f 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -23,31 +23,11 @@ then exit 1 fi -echo "Test if you has the tools for to make the packages." -whereis dh-make-perl | cut -d":" -f2 | grep dh-make-perl > /dev/null -if [ $? = 1 ] -then - echo "No found \"dh-make-perl\" aplication, please install." - exit 1 -else - echo "Found \"dh-make-perl\"." -fi - cd .. echo "Make a \"temp_package\" temp dir for job." mkdir temp_package -echo "Make the fake tree system in \"temp_package\"." -mkdir -p temp_package/var/spool/pandora/data_in/conf -mkdir -p temp_package/var/spool/pandora/data_in/md5 -mkdir -p temp_package/var/log/pandora -mkdir -p temp_package/etc/pandora -mkdir -p temp_package/etc/init.d/ -mkdir -p temp_package/etc/logrotate.d -mkdir -p temp_package/usr/share/pandora_server -mkdir -p temp_package/usr/bin - echo "Make the perl of Pandora Server." perl Makefile.PL make @@ -65,18 +45,10 @@ cat Makefile.temp | sed -e "s/INSTALLSITESCRIPT = .*/INSTALLSITESCRIPT = temp_pa cat Makefile | sed -e "s/INSTALLVENDORSCRIPT = .*/INSTALLVENDORSCRIPT = temp_package\/usr\/bin/" > Makefile.temp mv Makefile.temp Makefile + make install echo "Copy other files in fake file." -cp util/pandora_logrotate temp_package/etc/logrotate.d/pandora - -cp bin/tentacle_server temp_package/usr/bin -cp util/tentacle_serverd temp_package/etc/init.d/tentacle_serverd - -cp conf/pandora_server.conf temp_package/etc/pandora/ -cp util/pandora_server temp_package/etc/init.d/ - -cp -R util temp_package/usr/share/pandora_server cp -R DEBIAN temp_package/ echo "Remove the SVN files and other temp files." @@ -90,6 +62,12 @@ do rm -rf $item fi + echo $item | grep "perllocal.pod" > /dev/null + if [ $? -eq 0 ] + then + rm -rf $item + fi + echo $item | grep "make_deb_package.sh" > /dev/null #last command success if [ $? -eq 0 ] @@ -122,22 +100,11 @@ echo "END" echo "Make the package \"Pandorafms server\"." dpkg-deb --build temp_package -mv temp_package.deb pandorafms.server_$pandora_console_version.deb -chmod 777 pandorafms.server_$pandora_console_version.deb - -echo "Make the package \"libnet-traceroute-pureperl-perl\"." -cd temp_package -dh-make-perl --build --cpan Net::Traceroute::PurePerl -chmod 777 libnet-traceroute-pureperl-perl*.deb -mv libnet-traceroute-pureperl-perl*.deb .. -cd .. - -echo "Make the package \"libnet-traceroute-perl\"." -cd temp_package -dh-make-perl --build --cpan Net::Traceroute -chmod 777 libnet-traceroute-perl*.deb -mv libnet-traceroute-perl*.deb .. -cd .. +mv temp_package.deb pandorafms.server_enterprise_$pandora_console_version.deb +chmod 777 pandorafms.server_enterprise_$pandora_console_version.deb echo "Delete the \"temp_package\" temp dir for job." +rm Makefile +rm -rf blib +rm pm_to_blib rm -rf temp_package diff --git a/pandora_server/DEBIAN/postinst b/pandora_server/DEBIAN/postinst index 24cfcd84ac..8708d78183 100755 --- a/pandora_server/DEBIAN/postinst +++ b/pandora_server/DEBIAN/postinst @@ -1,91 +1,4 @@ #!/bin/bash -get_distro () { - # Get Linux Distro type and version - # We assume we are on Linux unless told otherwise - LINUX=YES - if [ -f "/etc/SuSE-release" ] - then - OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "` - LINUX_DISTRO=SUSE - elif [ -f "/etc/lsb-release" ] - then - OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d "="` - LINUX_DISTRO=UBUNTU - OS_VERSION="UBUNTU $OS_VERSION" - elif [ -f "/etc/debian_version" ] - then - OS_VERSION=`cat /etc/debian_version` - OS_VERSION="DEBIAN $OS_VERSION" - LINUX_DISTRO=DEBIAN - elif [ -f "/etc/fedora-release" ] - then - OS_VERSION=`cat /etc/fedora-release | cut -f 4 -d " "` - OS_VERSION="FEDORA $OS_VERSION" - LINUX_DISTRO=FEDORA - elif [ `uname -s` == "Darwin" ] - then - # For future reference, Darwin doesn't have /etc/init.d but uses LaunchDaemons - LINUX_DISTRO="Darwin" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "AIX" ] - then - # For future reference, AIX doesn't have /etc/init.d - LINUX_DISTRO="AIX" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "SunOS" ] - then - # Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool - LINUX_DISTRO="Solaris" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "Linux" ] - then - # Test for Linux to make sure we're on Linux - LINUX_DISTRO="GENERIC" - OS_VERSION=`uname -r` - else - # Default to Linux is false, test for real Linux above - that way we don't assume we can just plunk down files everywhere - LINUX_DISTRO=`uname -s` - OS_VERSION=`uname -r` - LINUX=NO - fi - echo "$LINUX_DISTRO:$OS_VERSION:$LINUX" -} - - -echo "Creating common Pandora FMS directories" -useradd pandora 2> /dev/null -mkdir -p /home/pandora/.ssh 2> /dev/null -chown -R pandora:root /home/pandora -chmod 755 /usr/bin/tentacle_server - -echo "Giving proper permission to /var/spool/pandora" -chown -R pandora /var/spool/pandora/ - -echo "Creating setup directory in /etc/pandora" -mkdir /etc/pandora 2> /dev/null - -chmod 770 /etc/pandora/pandora_server.conf - -echo "Linking startup script to /etc/rc2.d" -update-rc.d pandora_server defaults - -# Tentacle server install -echo "Installing tentacle server in /etc/rc2.d/S80tentacle_serverd" -update-rc.d tentacle_serverd defaults - -if [ -d /etc/cron.daily ] -then - echo "Create the Cron script to run daily Pandora DB tool" - echo "#!/bin/bash" > /etc/cron.daily/pandora_db - echo "perl /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 -else - echo "You're probably not using cron for automatic scheduling. You should schedule the following command to run frequently (daily) on your master server:" - echo " perl /usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" -fi - -echo "Please, now, edit the /etc/pandora/pandora_server.conf and launch the Pandora Server with /etc/init.d/Pandora ." +echo "NOTICE: You will need to edit your pandora_server.conf file to enable Enterprise features and restart Pandora FMS server after that." +echo "Please note that you must enter in Pandora FMS Enteprise console PRIOR to execute Pandora FMS Enterprise server" diff --git a/pandora_server/DEBIAN/prerm b/pandora_server/DEBIAN/prerm index e1d662a682..a9bf588e2f 100755 --- a/pandora_server/DEBIAN/prerm +++ b/pandora_server/DEBIAN/prerm @@ -1,72 +1 @@ #!/bin/bash - -get_distro () { - # Get Linux Distro type and version - # We assume we are on Linux unless told otherwise - LINUX=YES - if [ -f "/etc/SuSE-release" ] - then - OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "` - LINUX_DISTRO=SUSE - elif [ -f "/etc/lsb-release" ] - then - OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d "="` - LINUX_DISTRO=UBUNTU - OS_VERSION="UBUNTU $OS_VERSION" - elif [ -f "/etc/debian_version" ] - then - OS_VERSION=`cat /etc/debian_version` - OS_VERSION="DEBIAN $OS_VERSION" - LINUX_DISTRO=DEBIAN - elif [ -f "/etc/fedora-release" ] - then - OS_VERSION=`cat /etc/fedora-release | cut -f 4 -d " "` - OS_VERSION="FEDORA $OS_VERSION" - LINUX_DISTRO=FEDORA - elif [ `uname -s` == "Darwin" ] - then - # For future reference, Darwin doesn't have /etc/init.d but uses LaunchDaemons - LINUX_DISTRO="Darwin" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "AIX" ] - then - # For future reference, AIX doesn't have /etc/init.d - LINUX_DISTRO="AIX" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "SunOS" ] - then - # Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool - LINUX_DISTRO="Solaris" - OS_VERSION=`uname -r` - LINUX=NO - elif [ `uname -s` == "Linux" ] - then - # Test for Linux to make sure we're on Linux - LINUX_DISTRO="GENERIC" - OS_VERSION=`uname -r` - else - # Default to Linux is false, test for real Linux above - that way we don't assume we can just plunk down files everywhere - LINUX_DISTRO=`uname -s` - OS_VERSION=`uname -r` - LINUX=NO - fi - echo "$LINUX_DISTRO:$OS_VERSION:$LINUX" -} - -rm /etc/pandora/pandora_server.conf - -GET_DISTRO="`get_distro`" -DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"` - -rm /etc/init.d/pandora_server -rm /etc/init.d/tentacle_serverd -update-rc.d pandora_server remove -update-rc.d tentacle_serverd remove - -if [ -d /etc/cron.daily ] -then - rm /etc/cron.daily/pandora_db -fi -