2010-03-02 Raul Mateos <raulofpandora@gmail.com>

* 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
This commit is contained in:
raulmateos 2010-03-02 15:33:43 +00:00
parent 57df567e55
commit 7c5f8f5336
4 changed files with 45 additions and 35 deletions

View File

@ -1,3 +1,10 @@
2010-03-02 Raúl Mateos <raulofpandora@gmail.com>
* 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 <slerena@artica.es>
* util/tentacle_serverd,

View File

@ -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 <rnovoa@artica.es>
# 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 <storage directory> [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");

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Copyright (c) 2005-2009 Artica ST
# Copyright (c) 2005-2010 Artica ST
#
# Author: Sancho Lerena <slerena@artica.es> 2006-2009
# Author: Sancho Lerena <slerena@artica.es> 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

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2005-2009 Artica ST
# Copyright (c) 2005-2010 Artica ST
#
# Author: Sancho Lerena <slerena@artica.es> 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