2009-09-21 Sancho Lerena <slerena@artica.es>

* pandora_server.spec: Fixed a few details.  

        * bin/pandora_server: Error handler needs to be reviewed, Enterprise 
        errors are too nasty :(

        * util/tentacle_serverd: Fixed LSB tags problems for RPM install

        * util/pandora_server: Fixed LSB tags problems and fix a bug who make
        script inusable :(




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1960 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-09-21 00:34:14 +00:00
parent e9da8865d5
commit 5d0fb10e0a
5 changed files with 55 additions and 32 deletions

View File

@ -1,3 +1,15 @@
2009-09-21 Sancho Lerena <slerena@artica.es>
* pandora_server.spec: Fixed a few details.
* bin/pandora_server: Error handler needs to be reviewed, Enterprise
errors are too nasty :(
* util/tentacle_serverd: Fixed LSB tags problems for RPM install
* util/pandora_server: Fixed LSB tags problems and fix a bug who make
script inusable :(
2009-09-18 Sancho Lerena <slerena@artica.es> 2009-09-18 Sancho Lerena <slerena@artica.es>
* util/pandora_db.pl: Minor improvements in script. Added * util/pandora_db.pl: Minor improvements in script. Added

View File

@ -71,7 +71,9 @@ sub pandora_crash () {
$SIG{'TERM'} = 'pandora_shutdown'; $SIG{'TERM'} = 'pandora_shutdown';
$SIG{'INT'} = 'pandora_shutdown'; $SIG{'INT'} = 'pandora_shutdown';
$SIG{__DIE__} = 'pandora_crash';
# Error handler needs to be reviewed, Enterprise not found errors are too nasty :(
#$SIG{__DIE__} = 'pandora_crash';
# Prevent alarm from bombing the main thread when called within a thread # Prevent alarm from bombing the main thread when called within a thread
$SIG{'ALRM'} = 'IGNORE'; $SIG{'ALRM'} = 'IGNORE';

View File

@ -21,8 +21,8 @@ BuildArchitectures: noarch
Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/useradd
AutoReq: 0 AutoReq: 0
Provides: %{name}-%{version} Provides: %{name}-%{version}
Requires: perl-mail-sendmail perl-DBI perl-DBD-mysql perl-time-format Requires: perl-Mail-Sendmail perl-DBI perl-DBD-mysql perl-time-format
Requires: perl-mail-sendmail perl-netaddr-ip net-snmp Requires: perl-NetAddr-IP net-snmp
Requires: nmap wmic sudo Requires: nmap wmic sudo
%description %description
@ -82,7 +82,7 @@ chkconfig -s pandora_server on
chkconfig -s tentacle_serverd on chkconfig -s tentacle_serverd on
echo "/usr/share/pandora_server/util/pandora_db /etc/pandora/pandora_server.conf" > /etc/cron.daily/pandora_db echo "/usr/share/pandora_server/util/pandora_db /etc/pandora/pandora_server.conf" > /etc/cron.daily/pandora_db
chmod 750 /etc/cron.daily/pandora_db chmod 750 /etc/cron.daily/pandora_db
cp -aRf util/pandora_logrotate /etc/logrotate.d/pandora cp -aRf /usr/share/pandora_server/util/pandora_logrotate /etc/logrotate.d/pandora
if [ ! -d /etc/pandora ] ; then if [ ! -d /etc/pandora ] ; then
mkdir -p /etc/pandora mkdir -p /etc/pandora

View File

@ -1,21 +1,25 @@
#!/bin/bash #! /bin/sh
# Copyright (c) 2005-2009 Artica ST
# Pandora FMS Server, startup script #
# Copyright (c) 2006-2009 Sancho Lerena, <sancho.lerena@artica.es> # Author: Sancho Lerena <slerena@artica.es> 2006-2009
# Linux Version (generic), for SuSe, Debian and Ubuntu. #
# other Linux distros could not work properly without modifications # /etc/init.d/pandora_server
# v3.0 Build 090915 #
# http://www.pandorafms.com # System startup script for Pandora FMS
#
### BEGIN INIT INTO ### BEGIN INIT INFO
# Provides: pandora_server # Provides: pandora_server
# Required-Start: $syslog mysql
# Should-Start: $network
# Required-Stop: $syslog mysql
# Should-Stop: $network mysql
# Default-Start: 2 3 5 # Default-Start: 2 3 5
# Default-Stop: 0 1 2 3 5 # Default-Stop: 0 1 6
# Required-Start: $network
# Required-Stop: $network
# Short-Description: Pandora FMS Server startup script # Short-Description: Pandora FMS Server startup script
# Description: Pandora FMS Server startup script
### END INIT INFO ### END INIT INFO
PANDORA_HOME="/etc/pandora/pandora_server.conf" PANDORA_HOME="/etc/pandora/pandora_server.conf"
PANDORA_PID_PATH="/var/run" PANDORA_PID_PATH="/var/run"
PANDORA_PID=$PANDORA_PID_PATH/pandora_server.pid PANDORA_PID=$PANDORA_PID_PATH/pandora_server.pid
@ -25,7 +29,7 @@ PANDORA_DAEMON=/usr/local/bin/pandora_server
# This function replace pidof, not working in the same way in different linux distros # This function replace pidof, not working in the same way in different linux distros
function pidof_pandora () ( function pidof_pandora () (
PANDORA_PID=`ps aux | grep $PANDORA_DAEMON $PANDORA_HOME| grep -v grep | tail -1 | awk '{ print $2 }'` PANDORA_PID=`ps aux | grep "$PANDORA_DAEMON $PANDORA_HOME" | grep -v grep | tail -1 | awk '{ print $2 }'`
echo $PANDORA_PID echo $PANDORA_PID
) )

View File

@ -1,17 +1,22 @@
#!/bin/bash #! /bin/sh
# Copyright (c) 2005-2009 Artica ST
# Tentacle server simple startup script #
# Copyright (c) 2007 Artica Soluciones Tecnologicas S.L. # Author: Sancho Lerena <slerena@artica.es> 2006-2009
# Linux Version (generic) #
# v0.1 Build 090827 # /etc/init.d/tentacle_server
#
### BEGIN INIT INTO # System startup script for Tentacle Server
#
### BEGIN INIT INFO
# Provides: tentacle_server # Provides: tentacle_server
# Default-Start: 2 3 5
# Default-Stop: 0 1 2 3 5
# Required-Start: $network # Required-Start: $network
# Should-Start: $syslog
# Required-Stop: $network # Required-Stop: $network
# Should-Stop: $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Tentacle Server startup script # Short-Description: Tentacle Server startup script
# Description: Tentacle Server startup script
### END INIT INFO ### END INIT INFO
# Pandora server settings # Pandora server settings