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:
parent
57df567e55
commit
7c5f8f5336
|
@ -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>
|
2010-02-27 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* util/tentacle_serverd,
|
* util/tentacle_serverd,
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Tentacle Server
|
# Tentacle Server
|
||||||
# See http://www.openideas.info/wiki for protocol description.
|
# See http://www.openideas.info/wiki/index.php?title=Tentacle for protocol
|
||||||
# Tentacle have IANA assigned port tpc/41121 as official port.
|
# description.
|
||||||
|
# Tentacle has IANA assigned port tpc/41121 as official port.
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
# Copyright (c) 2007-2008 Ramon Novoa <rnovoa@artica.es>
|
||||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||||
#
|
#
|
||||||
# tentacle_server.pl Tentacle Server. See http://www.openideas.info/wiki for
|
# tentacle_server.pl Tentacle Server. See
|
||||||
# protocol description.
|
# http://www.openideas.info/wiki/index.php?title=Tentacle
|
||||||
|
# for protocol description.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -147,7 +149,7 @@ my $t_timeout = 1;
|
||||||
sub print_help {
|
sub print_help {
|
||||||
|
|
||||||
print ("Usage: $0 -s <storage directory> [options]\n\n");
|
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 ("Options:\n");
|
||||||
print ("\t-a ip_address\tAddress to listen on (default $t_address).\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");
|
print ("\t-c number\tMaximum number of simultaneous connections (default $t_max_conn).\n");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/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
|
# /etc/init.d/pandora_server
|
||||||
#
|
#
|
||||||
|
@ -101,23 +101,23 @@ case "$1" in
|
||||||
kill $PANDORA_PID > /dev/null 2>&1
|
kill $PANDORA_PID > /dev/null 2>&1
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
|
|
||||||
while [ $COUNTER -lt $MAXWAIT ]
|
while [ $COUNTER -lt $MAXWAIT ]
|
||||||
do
|
do
|
||||||
PANDORA_PID=`pidof_pandora`
|
PANDORA_PID=`pidof_pandora`
|
||||||
if [ -z "$PANDORA_PID" ]
|
if [ -z "$PANDORA_PID" ]
|
||||||
then
|
then
|
||||||
COUNTER=$MAXWAIT
|
COUNTER=$MAXWAIT
|
||||||
fi
|
fi
|
||||||
COUNTER=`expr $COUNTER + 1`
|
COUNTER=`expr $COUNTER + 1`
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Send a KILL -9 signal to process, if it's alive after 60secs, we need
|
# Send a KILL -9 signal to process, if it's alive after 60secs, we need
|
||||||
# to be sure is really dead, and not pretending...
|
# to be sure is really dead, and not pretending...
|
||||||
if [ ! -z "$PANDORA_PID" ]
|
if [ ! -z "$PANDORA_PID" ]
|
||||||
then
|
then
|
||||||
kill -9 $PANDORA_PID > /dev/null 2>&1
|
kill -9 $PANDORA_PID > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
rc_status -v
|
rc_status -v
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -131,12 +131,12 @@ case "$1" in
|
||||||
echo "Pandora FMS Server is running with PID $PANDORA_PID."
|
echo "Pandora FMS Server is running with PID $PANDORA_PID."
|
||||||
rc_status
|
rc_status
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
$0 stop
|
$0 stop
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: pandora_server { start | stop | restart | status }"
|
echo "Usage: pandora_server { start | stop | restart | status }"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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-2009
|
||||||
#
|
#
|
||||||
|
@ -22,23 +22,23 @@
|
||||||
# Check for SUSE status scripts
|
# Check for SUSE status scripts
|
||||||
if [ -f /etc/rc.status ]
|
if [ -f /etc/rc.status ]
|
||||||
then
|
then
|
||||||
. /etc/rc.status
|
. /etc/rc.status
|
||||||
rc_reset
|
rc_reset
|
||||||
else
|
else
|
||||||
# Define rc functions for non-suse systems, "void" functions.
|
# Define rc functions for non-suse systems, "void" functions.
|
||||||
function rc_status () { VOID=1; }
|
function rc_status () { VOID=1; }
|
||||||
function rc_exit () { exit; }
|
function rc_exit () { exit; }
|
||||||
function rc_failed () { VOID=1; }
|
function rc_failed () { VOID=1; }
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function get_pid {
|
function get_pid {
|
||||||
# This sets COLUMNS to XXX chars, because if command is run
|
# This sets COLUMNS to XXX chars, because if command is run
|
||||||
# in a "strech" term, ps aux don't report more than COLUMNS
|
# in a "strech" term, ps aux don't report more than COLUMNS
|
||||||
# characters and this will not work.
|
# characters and this will not work.
|
||||||
COLUMNS=300
|
COLUMNS=300
|
||||||
TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'`
|
TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'`
|
||||||
echo $TENTACLE_PID
|
echo $TENTACLE_PID
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pandora server settings
|
# Pandora server settings
|
||||||
|
@ -94,6 +94,7 @@ case "$1" in
|
||||||
rc_status -v
|
rc_status -v
|
||||||
else
|
else
|
||||||
echo "Tentacle server could not be started."
|
echo "Tentacle server could not be started."
|
||||||
|
echo "Verify that port $TENTACLE_PORT is not used."
|
||||||
rc_status -v
|
rc_status -v
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue