mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Modified server tarball to permit enterprise installer call (from-binary option)
This commit is contained in:
parent
1242db08f8
commit
671b40f5bf
31
pandora_server/pandora_server_installer
Normal file → Executable file
31
pandora_server/pandora_server_installer
Normal file → Executable file
@ -45,7 +45,7 @@ set_global_vars () {
|
|||||||
OS_VERSION=`uname -r`
|
OS_VERSION=`uname -r`
|
||||||
DISTRO=`uname -s`
|
DISTRO=`uname -s`
|
||||||
|
|
||||||
# set corret value for LINUX_DISTRO
|
# set correct value for LINUX_DISTRO
|
||||||
case $DISTRO in
|
case $DISTRO in
|
||||||
Linux)
|
Linux)
|
||||||
# Default for Linux
|
# Default for Linux
|
||||||
@ -168,19 +168,31 @@ install () {
|
|||||||
set_global_vars
|
set_global_vars
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
BINARIES=0
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
--force) FORCE=1;;
|
--force) FORCE=1;;
|
||||||
--no-tentacle) WITHOUT_TENTALCE=1;;
|
--from-binary) BINARIES=1;;
|
||||||
|
--no-tentacle) WITHOUT_TENTACLE=1;;
|
||||||
--destdir) DESTDIR=$2;shift;;
|
--destdir) DESTDIR=$2;shift;;
|
||||||
*) break;;
|
*) break;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
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
|
$PERL Makefile.PL INSTALLMAN1DIR=none WITHOUT_TENTACLE=$WITHOUT_TENTACLE > output 2>&1
|
||||||
#&& sleep 2 && cat output | grep "found" | wc -l
|
#&& sleep 2 && cat output | grep "found" | wc -l
|
||||||
DEPENDENCIAS=`cat output | grep "found" | wc -l`
|
DEPENDENCIAS=`cat output | grep "found" | wc -l`
|
||||||
@ -230,13 +242,6 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
|
|||||||
fi
|
fi
|
||||||
rm output
|
rm output
|
||||||
|
|
||||||
if [ "$LINUX" = YES ]
|
|
||||||
then
|
|
||||||
echo "$DISTRO distribution detected"
|
|
||||||
else
|
|
||||||
echo "$DISTRO detected"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Installing binaries and libraries"
|
echo "Installing binaries and libraries"
|
||||||
make
|
make
|
||||||
make DESTDIR=$DESTDIR install
|
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
|
ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Creating common Pandora FMS directories"
|
echo "Creating common Pandora FMS directories"
|
||||||
id pandora 2> /dev/null
|
id pandora 2> /dev/null
|
||||||
@ -484,12 +490,13 @@ help () {
|
|||||||
echo " --force Ignore dependency problems and do the install"
|
echo " --force Ignore dependency problems and do the install"
|
||||||
echo " --no-tentacle Skip tentacle server installation (by default tentacle server installed)"
|
echo " --no-tentacle Skip tentacle server installation (by default tentacle server installed)"
|
||||||
echo " --destdir DIR Specify root directory for \"fakeroot\" installation"
|
echo " --destdir DIR Specify root directory for \"fakeroot\" installation"
|
||||||
|
echo " --from-binary No compile Pandora Server and not execute Makefiles"
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
|
|
||||||
# Script banner at start
|
# Script banner at start
|
||||||
echo " "
|
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 "This program is licensed under GPL2 Terms. http://pandorafms.com"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
@ -497,12 +504,12 @@ case "$MODE" in
|
|||||||
|
|
||||||
'--install')
|
'--install')
|
||||||
install "$@"
|
install "$@"
|
||||||
exit
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'--uninstall')
|
'--uninstall')
|
||||||
uninstall "$@"
|
uninstall "$@"
|
||||||
exit
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user