From 7c5f8f5336710d72b644d93f825364ec709fee0f Mon Sep 17 00:00:00 2001 From: raulmateos Date: Tue, 2 Mar 2010 15:33:43 +0000 Subject: [PATCH] 2010-03-02 Raul Mateos * util/tentacle_serverd, util/pandora_server: Updated year. Changed spaces to tabs. * bin/tentacle_server: Updated year. Updated URL for documentation. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2447 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 7 ++++++ pandora_server/bin/tentacle_server | 12 ++++++---- pandora_server/util/pandora_server | 36 ++++++++++++++-------------- pandora_server/util/tentacle_serverd | 25 +++++++++---------- 4 files changed, 45 insertions(+), 35 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e4157a15c4..c099a9dc42 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2010-03-02 Raúl Mateos + + * util/tentacle_serverd, util/pandora_server: Updated year. Changed + spaces to tabs. + + * bin/tentacle_server: Updated year. Updated URL for documentation. + 2010-02-27 Sancho Lerena * util/tentacle_serverd, diff --git a/pandora_server/bin/tentacle_server b/pandora_server/bin/tentacle_server index db46f7c427..3bd3fbc950 100755 --- a/pandora_server/bin/tentacle_server +++ b/pandora_server/bin/tentacle_server @@ -1,14 +1,16 @@ #!/usr/bin/perl ########################################################################## # Tentacle Server -# See http://www.openideas.info/wiki for protocol description. -# Tentacle have IANA assigned port tpc/41121 as official port. +# See http://www.openideas.info/wiki/index.php?title=Tentacle for protocol +# description. +# Tentacle has IANA assigned port tpc/41121 as official port. ########################################################################## # Copyright (c) 2007-2008 Ramon Novoa # Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L # -# tentacle_server.pl Tentacle Server. See http://www.openideas.info/wiki for -# protocol description. +# tentacle_server.pl Tentacle Server. See +# http://www.openideas.info/wiki/index.php?title=Tentacle +# for protocol description. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -147,7 +149,7 @@ my $t_timeout = 1; sub print_help { print ("Usage: $0 -s [options]\n\n"); - print ("Tentacle server v$VERSION. See http://www.openideas.info/wiki for protocol description.\n\n"); + print ("Tentacle server v$VERSION. See http://www.openideas.info/wiki/index.php?title=Tentacle for protocol description.\n\n"); print ("Options:\n"); print ("\t-a ip_address\tAddress to listen on (default $t_address).\n"); print ("\t-c number\tMaximum number of simultaneous connections (default $t_max_conn).\n"); diff --git a/pandora_server/util/pandora_server b/pandora_server/util/pandora_server index f3fe93597d..1d37ac183a 100755 --- a/pandora_server/util/pandora_server +++ b/pandora_server/util/pandora_server @@ -1,7 +1,7 @@ #!/bin/bash -# Copyright (c) 2005-2009 Artica ST +# Copyright (c) 2005-2010 Artica ST # -# Author: Sancho Lerena 2006-2009 +# Author: Sancho Lerena 2006-2010 # # /etc/init.d/pandora_server # @@ -101,23 +101,23 @@ case "$1" in kill $PANDORA_PID > /dev/null 2>&1 COUNTER=0 - while [ $COUNTER -lt $MAXWAIT ] - do - PANDORA_PID=`pidof_pandora` - if [ -z "$PANDORA_PID" ] - then - COUNTER=$MAXWAIT - fi - COUNTER=`expr $COUNTER + 1` - sleep 1 - done + while [ $COUNTER -lt $MAXWAIT ] + do + PANDORA_PID=`pidof_pandora` + if [ -z "$PANDORA_PID" ] + then + COUNTER=$MAXWAIT + fi + COUNTER=`expr $COUNTER + 1` + sleep 1 + done # Send a KILL -9 signal to process, if it's alive after 60secs, we need # to be sure is really dead, and not pretending... if [ ! -z "$PANDORA_PID" ] - then - kill -9 $PANDORA_PID > /dev/null 2>&1 - fi + then + kill -9 $PANDORA_PID > /dev/null 2>&1 + fi rc_status -v fi ;; @@ -131,12 +131,12 @@ case "$1" in echo "Pandora FMS Server is running with PID $PANDORA_PID." rc_status fi - ;; - force-reload|restart) + ;; + force-reload|restart) $0 stop $0 start ;; - *) + *) echo "Usage: pandora_server { start | stop | restart | status }" exit 1 esac diff --git a/pandora_server/util/tentacle_serverd b/pandora_server/util/tentacle_serverd index fd0d3259d6..978d7d43b5 100755 --- a/pandora_server/util/tentacle_serverd +++ b/pandora_server/util/tentacle_serverd @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2005-2009 Artica ST +# Copyright (c) 2005-2010 Artica ST # # Author: Sancho Lerena 2006-2009 # @@ -22,23 +22,23 @@ # Check for SUSE status scripts if [ -f /etc/rc.status ] then - . /etc/rc.status - rc_reset + . /etc/rc.status + rc_reset else - # Define rc functions for non-suse systems, "void" functions. - function rc_status () { VOID=1; } - function rc_exit () { exit; } - function rc_failed () { VOID=1; } + # Define rc functions for non-suse systems, "void" functions. + function rc_status () { VOID=1; } + function rc_exit () { exit; } + function rc_failed () { VOID=1; } fi function get_pid { # This sets COLUMNS to XXX chars, because if command is run - # in a "strech" term, ps aux don't report more than COLUMNS - # characters and this will not work. - COLUMNS=300 - TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'` - echo $TENTACLE_PID + # in a "strech" term, ps aux don't report more than COLUMNS + # characters and this will not work. + COLUMNS=300 + TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'` + echo $TENTACLE_PID } # Pandora server settings @@ -94,6 +94,7 @@ case "$1" in rc_status -v else echo "Tentacle server could not be started." + echo "Verify that port $TENTACLE_PORT is not used." rc_status -v fi