2008-06-19 Sancho Lerena <slerena@gmail.com>
* pandora_plugin: Added startup script. * Makefile.PL: Added new perl dependencies. * pandora_server_installer: Some fixes and updates. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@887 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
46814a59c8
commit
06597be2e7
|
@ -1,7 +1,10 @@
|
|||
2008-06-19 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
2008-06-19 Sancho Lerena <slerena@gmail.com>
|
||||
* pandora_plugin: Added startup script.
|
||||
|
||||
* pandora_recon: Added sleep to main loop to save CPU.
|
||||
* Makefile.PL: Added new perl dependencies.
|
||||
|
||||
* pandora_recon: Added sleep to main loop to save CPU.
|
||||
|
||||
2008-06-18 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ WriteMakefile(
|
|||
Net::Ping => 0,
|
||||
Time::HiRes => 0,
|
||||
IO::Socket => 0,
|
||||
Mail::Sendmail => 0,
|
||||
Net::Traceroute::PurePerl => 0,
|
||||
SNMP => 0
|
||||
},
|
||||
EXE_FILES =>
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Pandora FMS Plugin Server, startup script
|
||||
# Sancho Lerena, <slerena@gmail.com>
|
||||
# Linux Version (generic)
|
||||
# 2.0 Build 080620
|
||||
|
||||
# Configurable path and filenames
|
||||
PANDORA_HOME="/etc/pandora/pandora_server.conf"
|
||||
PANDORA_PID_PATH="/var/run"
|
||||
PANDORA_PID=$PANDORA_PID_PATH/pandora_plugin.pid
|
||||
PANDORA_DAEMON=/usr/bin/pandora_plugin
|
||||
|
||||
# Main script
|
||||
|
||||
if [ ! -d "$PANDORA_PID_PATH" ]
|
||||
then
|
||||
echo "Pandora FMS Plugin Server cannot write it's PID file in $PANDORA_PID_PATH. Please create that directory"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f $PANDORA_DAEMON ]
|
||||
then
|
||||
echo "Pandora FMS Plugin Server not found, please check setup and read manual"
|
||||
exit
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
OLD_PATH="`pwd`"
|
||||
PANDORA_PID=$(pidof -x $PANDORA_DAEMON)
|
||||
if [ ! -z $PANDORA_PID ]
|
||||
then
|
||||
echo "Pandora FMS Plugin Server is currently running on this machine with PID ($PANDORA_PID). Aborting now..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$PANDORA_DAEMON $PANDORA_HOME -D
|
||||
sleep 1
|
||||
|
||||
PANDORA_PID=$(pidof -x $PANDORA_DAEMON)
|
||||
if [ ! -z "$PANDORA_PID" ]
|
||||
then
|
||||
echo "Pandora FMS Plugin Server is now running with PID $PANDORA_PID"
|
||||
else
|
||||
echo "Cannot start Pandora FMS Plugin Server. Aborted."
|
||||
fi
|
||||
cd "$OLD_PATH"
|
||||
;;
|
||||
stop)
|
||||
PANDORA_PID=$(pidof -x $PANDORA_DAEMON)
|
||||
if [ -z $PANDORA_PID ]
|
||||
then
|
||||
echo "Pandora FMS Plugin Server is not running, cannot stop it."
|
||||
exit 1
|
||||
else
|
||||
echo "Stopping Pandora FMS Plugin Server"
|
||||
kill $PANDORA_PID > /dev/null 2>&1
|
||||
rm -f $PANDORA_PID
|
||||
fi
|
||||
;;
|
||||
force-reload|restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: pandora_plugin {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
|
@ -51,13 +51,26 @@ else
|
|||
ln -s /etc/init.d/pandora_recon /etc/rc2.d/S90pandora_recon
|
||||
ln -s /etc/init.d/pandora_network /etc/rc2.d/S90pandora_network
|
||||
ln -s /etc/init.d/pandora_snmpconsole /etc/rc2.d/S90pandora_snmpconsole
|
||||
ln -s /usr/local/bin/pandora_server /usr/bin/pandora_server
|
||||
ln -s /usr/local/bin/pandora_snmpconsole /usr/bin/pandora_snmpconsole
|
||||
ln -s /usr/local/bin/pandora_recon /usr/bin/pandora_recon
|
||||
ln -s /usr/local/bin/pandora_network /usr/bin/pandora_network
|
||||
ln -s /usr/local/bin/pandora_prediction /usr/bin/pandora_prediction
|
||||
ln -s /usr/local/bin/pandora_plugin /usr/bin/pandora_plugin
|
||||
ln -s /usr/local/bin/pandora_export /usr/bin/pandora_export
|
||||
ln -s /etc/init.d/pandora_plugin /etc/rc2.d/S90pandora_plugin
|
||||
ln -s /etc/init.d/pandora_prediction /etc/rc2.d/S90pandora_prediction
|
||||
|
||||
if [ -e /usr/local/bin/pandora_server ]
|
||||
then
|
||||
ln -s /usr/local/bin/pandora_server /usr/bin/pandora_server
|
||||
ln -s /usr/local/bin/pandora_snmpconsole /usr/bin/pandora_snmpconsole
|
||||
ln -s /usr/local/bin/pandora_recon /usr/bin/pandora_recon
|
||||
ln -s /usr/local/bin/pandora_network /usr/bin/pandora_network
|
||||
ln -s /usr/local/bin/pandora_prediction /usr/bin/pandora_prediction
|
||||
ln -s /usr/local/bin/pandora_plugin /usr/bin/pandora_plugin
|
||||
else
|
||||
ln -s /usr/bin/pandora_server /usr/local/bin/pandora_server
|
||||
ln -s /usr/bin/pandora_network /usr/local/bin/pandora_network
|
||||
ln -s /usr/bin/pandora_recon /usr/local/bin/pandora_recon
|
||||
ln -s /usr/bin/pandora_plugin /usr/local/bin/pandora_plugin
|
||||
ln -s /usr/bin/pandora_prediction /usr/local/bin/pandora_prediction
|
||||
ln -s /usr/bin/pandora_snmpconsole /usr/local/bin/pandora_snmpconsole
|
||||
fi
|
||||
|
||||
mkdir /usr/share/pandora
|
||||
cp -R util /usr/share/pandora
|
||||
cp -R plugin /usr/share/pandora
|
||||
|
|
Loading…
Reference in New Issue