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`
|
||||
|
||||
echo "Copying the daemon script into $INITDIR"
|
||||
[ -d $DESTDIR$INITDIR ] || mkdir -p $DESTDIR$INITDIR
|
||||
cp $SRC $DESTDIR$INITDIR
|
||||
|
||||
[ "$DESTDIR" ] && return
|
||||
|
@ -256,6 +257,7 @@ install () {
|
|||
fi
|
||||
if [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
|
||||
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_exec $DESTDIR$PREFIX/bin
|
||||
ln -s /usr/local/bin/tentacle_server $DESTDIR$PREFIX/bin
|
||||
|
@ -339,13 +341,14 @@ install () {
|
|||
fi
|
||||
|
||||
echo "Installing Pandora Server manual"
|
||||
[ -d $DESTDIR$MANDIR ] || mkdir -p $DESTDIR$MANDIR
|
||||
cp man/man1/pandora_server.1.gz $DESTDIR$MANDIR
|
||||
|
||||
install_startup_script -s 90 $PANDORA_INIT_SCRIPT
|
||||
|
||||
if [ -d /etc/logrotate.d ]
|
||||
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"
|
||||
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
|
||||
else
|
||||
|
@ -372,8 +375,8 @@ install () {
|
|||
[ ! -d $DESTDIR/etc/cron.hourly ] && mkdir -p $DESTDIR/etc/cron.hourly
|
||||
echo "Creating the Cron script to run Pandora DB tool each hour"
|
||||
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
|
||||
chmod +x /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 $DESTDIR/etc/cron.hourly/pandora_db
|
||||
elif [ "$DISTRO" = "FreeBSD" ] || [ "$DISTRO" = "NetBSD" ]
|
||||
then
|
||||
if [ "$DESTDIR" ]
|
||||
|
|
Loading…
Reference in New Issue