Modified server tarball to permit enterprise installer call (from-binary option)

This commit is contained in:
fermin831 2016-01-13 16:04:36 +01:00
parent 1242db08f8
commit 671b40f5bf
1 changed files with 75 additions and 68 deletions

35
pandora_server/pandora_server_installer Normal file → Executable file
View File

@ -45,7 +45,7 @@ set_global_vars () {
OS_VERSION=`uname -r`
DISTRO=`uname -s`
# set corret value for LINUX_DISTRO
# set correct value for LINUX_DISTRO
case $DISTRO in
Linux)
# Default for Linux
@ -168,19 +168,31 @@ install () {
set_global_vars
FORCE=0
BINARIES=0
# parse options
while :
do
case $1 in
--force) FORCE=1;;
--no-tentacle) WITHOUT_TENTALCE=1;;
--from-binary) BINARIES=1;;
--no-tentacle) WITHOUT_TENTACLE=1;;
--destdir) DESTDIR=$2;shift;;
*) break;;
esac
shift
done
if [ "$LINUX" = YES ]
then
echo "$DISTRO distribution detected"
else
echo "$DISTRO detected"
fi
if [ ! $BINARIES -eq 1 ]
# Do not compile files if binary is distributed
then
$PERL Makefile.PL INSTALLMAN1DIR=none WITHOUT_TENTACLE=$WITHOUT_TENTACLE > output 2>&1
#&& sleep 2 && cat output | grep "found" | wc -l
DEPENDENCIAS=`cat output | grep "found" | wc -l`
@ -202,8 +214,8 @@ install () {
echo "For OpenSUSE / SLES do : "
echo " "
echo " # zypper install nmap perl-DBD-mysql perl-DBI perl-HTML-Parser perl-JSON
perl-HTML-Encoding perl-HTML-Tree perl-NetAddr-IP perl-IO-Socket-INET6 perl-Socket6
perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
perl-HTML-Encoding perl-HTML-Tree perl-NetAddr-IP perl-IO-Socket-INET6 perl-Socket6
perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
echo " "
echo " You also will need to install (optionally) xprobe2 and wmiclient from rpm (download from our website)"
echo " "
@ -230,13 +242,6 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
fi
rm output
if [ "$LINUX" = YES ]
then
echo "$DISTRO distribution detected"
else
echo "$DISTRO detected"
fi
echo "Installing binaries and libraries"
make
make DESTDIR=$DESTDIR install
@ -256,6 +261,7 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin
fi
fi
fi
echo "Creating common Pandora FMS directories"
id pandora 2> /dev/null
@ -484,12 +490,13 @@ help () {
echo " --force Ignore dependency problems and do the install"
echo " --no-tentacle Skip tentacle server installation (by default tentacle server installed)"
echo " --destdir DIR Specify root directory for \"fakeroot\" installation"
echo " --from-binary No compile Pandora Server and not execute Makefiles"
echo " "
}
# Script banner at start
echo " "
echo "Pandora FMS Server Installer $PI_VERSION $PI_BUILD (c) 2008-2015 Artica ST"
echo "Pandora FMS Server Installer $PI_VERSION $PI_BUILD (c) 2008-2016 Artica ST"
echo "This program is licensed under GPL2 Terms. http://pandorafms.com"
echo " "
@ -497,12 +504,12 @@ case "$MODE" in
'--install')
install "$@"
exit
exit 0
;;
'--uninstall')
uninstall "$@"
exit
exit 0
;;
*)