mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Fixed fake installation on some Linux distros.
This commit is contained in:
parent
b29d4394c2
commit
0031b8ecd2
@ -135,6 +135,7 @@ install_startup_script () {
|
|||||||
SCRIPT_NAME=`basename $SRC`
|
SCRIPT_NAME=`basename $SRC`
|
||||||
|
|
||||||
echo "Copying the daemon script into $INITDIR"
|
echo "Copying the daemon script into $INITDIR"
|
||||||
|
[ -d $DESTDIR$INITDIR ] || mkdir -p $DESTDIR$INITDIR
|
||||||
cp $SRC $DESTDIR$INITDIR
|
cp $SRC $DESTDIR$INITDIR
|
||||||
|
|
||||||
[ "$DESTDIR" ] && return
|
[ "$DESTDIR" ] && return
|
||||||
@ -256,6 +257,7 @@ install () {
|
|||||||
fi
|
fi
|
||||||
if [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
|
if [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
|
||||||
then
|
then
|
||||||
|
[ -d $DESTDIR$PREFIX/bin ] || mkdir -p $DESTDIR$PREFIX/bin
|
||||||
ln -s /usr/local/bin/pandora_server $DESTDIR$PREFIX/bin
|
ln -s /usr/local/bin/pandora_server $DESTDIR$PREFIX/bin
|
||||||
ln -s /usr/local/bin/pandora_exec $DESTDIR$PREFIX/bin
|
ln -s /usr/local/bin/pandora_exec $DESTDIR$PREFIX/bin
|
||||||
ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin
|
ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin
|
||||||
@ -339,13 +341,14 @@ install () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing Pandora Server manual"
|
echo "Installing Pandora Server manual"
|
||||||
|
[ -d $DESTDIR$MANDIR ] || mkdir -p $DESTDIR$MANDIR
|
||||||
cp man/man1/pandora_server.1.gz $DESTDIR$MANDIR
|
cp man/man1/pandora_server.1.gz $DESTDIR$MANDIR
|
||||||
|
|
||||||
install_startup_script -s 90 $PANDORA_INIT_SCRIPT
|
install_startup_script -s 90 $PANDORA_INIT_SCRIPT
|
||||||
|
|
||||||
if [ -d /etc/logrotate.d ]
|
if [ -d /etc/logrotate.d ]
|
||||||
then
|
then
|
||||||
[ -d $DESTDIR/etc/logrotate.d ] && mkdir -p $DESTDIR/etc/logrotate.d
|
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d
|
||||||
echo "Creating logrotate.d entry for Pandora FMS log management"
|
echo "Creating logrotate.d entry for Pandora FMS log management"
|
||||||
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
|
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
|
||||||
else
|
else
|
||||||
@ -372,8 +375,8 @@ install () {
|
|||||||
[ ! -d $DESTDIR/etc/cron.hourly ] && mkdir -p $DESTDIR/etc/cron.hourly
|
[ ! -d $DESTDIR/etc/cron.hourly ] && mkdir -p $DESTDIR/etc/cron.hourly
|
||||||
echo "Creating the Cron script to run Pandora DB tool each hour"
|
echo "Creating the Cron script to run Pandora DB tool each hour"
|
||||||
echo "#!/bin/bash" > $DESTDIR/etc/cron.hourly/pandora_db
|
echo "#!/bin/bash" > $DESTDIR/etc/cron.hourly/pandora_db
|
||||||
echo "perl $PANDORA_HOME/util/pandora_db.pl /etc/pandora/pandora_server.conf" >> /etc/cron.hourly/pandora_db
|
echo "perl $PANDORA_HOME/util/pandora_db.pl /etc/pandora/pandora_server.conf" >> $DESTDIR/etc/cron.hourly/pandora_db
|
||||||
chmod +x /etc/cron.hourly/pandora_db
|
chmod +x $DESTDIR/etc/cron.hourly/pandora_db
|
||||||
elif [ "$DISTRO" = "FreeBSD" ] || [ "$DISTRO" = "NetBSD" ]
|
elif [ "$DISTRO" = "FreeBSD" ] || [ "$DISTRO" = "NetBSD" ]
|
||||||
then
|
then
|
||||||
if [ "$DESTDIR" ]
|
if [ "$DESTDIR" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user