Update copies of the Tentacle Server. Small fixes.

This commit is contained in:
Ramon Novoa 2022-10-11 11:48:02 +02:00
parent e5bdceee78
commit 83a669b1bc
8 changed files with 80 additions and 1877 deletions

View File

@ -5,7 +5,7 @@
# Tentacle have IANA assigned port tpc/41121 as official port. # Tentacle have 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-2022 Artica Soluciones Tecnologicas S.L
# #
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
# protocol description. # protocol description.
@ -1740,6 +1740,19 @@ sub callback_stop {
Win32::Daemon::StopService(); Win32::Daemon::StopService();
} }
################################################################################
## SUB check_ssleay_version
## Print a message if the installed version of Net::SSLeay may leak memory.
################################################################################
sub check_ssleay_version {
eval {
require Net::SSLeay;
return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88;
print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay");
};
}
################################################################################ ################################################################################
# Main # Main
################################################################################ ################################################################################
@ -1753,12 +1766,20 @@ if ($> == 0 && $^O ne 'MSWin32') {
# Parse command line options # Parse command line options
parse_options (); parse_options ();
# Try to open the log file.
if (defined($log_file)) {
open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n");
close($fh);
}
# Check command line arguments # Check command line arguments
if ($#ARGV != -1) { if ($#ARGV != -1) {
print_help (); print_help ();
exit 1; exit 1;
} }
check_ssleay_version() if $t_ssl == 1;
# Show IPv6 status # Show IPv6 status
if ($SOCKET_MODULE eq 'IO::Socket::INET') { if ($SOCKET_MODULE eq 'IO::Socket::INET') {
print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); print_log ("IO::Socket::INET6 is not found. IPv6 is disabled.");

View File

@ -5,7 +5,7 @@
# Tentacle have IANA assigned port tpc/41121 as official port. # Tentacle have 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-2022 Artica Soluciones Tecnologicas S.L
# #
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
# protocol description. # protocol description.
@ -1740,6 +1740,19 @@ sub callback_stop {
Win32::Daemon::StopService(); Win32::Daemon::StopService();
} }
################################################################################
## SUB check_ssleay_version
## Print a message if the installed version of Net::SSLeay may leak memory.
################################################################################
sub check_ssleay_version {
eval {
require Net::SSLeay;
return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88;
print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay");
};
}
################################################################################ ################################################################################
# Main # Main
################################################################################ ################################################################################
@ -1753,12 +1766,20 @@ if ($> == 0 && $^O ne 'MSWin32') {
# Parse command line options # Parse command line options
parse_options (); parse_options ();
# Try to open the log file.
if (defined($log_file)) {
open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n");
close($fh);
}
# Check command line arguments # Check command line arguments
if ($#ARGV != -1) { if ($#ARGV != -1) {
print_help (); print_help ();
exit 1; exit 1;
} }
check_ssleay_version() if $t_ssl == 1;
# Show IPv6 status # Show IPv6 status
if ($SOCKET_MODULE eq 'IO::Socket::INET') { if ($SOCKET_MODULE eq 'IO::Socket::INET') {
print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); print_log ("IO::Socket::INET6 is not found. IPv6 is disabled.");

View File

@ -5,7 +5,7 @@
# Tentacle have IANA assigned port tpc/41121 as official port. # Tentacle have 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-2022 Artica Soluciones Tecnologicas S.L
# #
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
# protocol description. # protocol description.
@ -1740,6 +1740,19 @@ sub callback_stop {
Win32::Daemon::StopService(); Win32::Daemon::StopService();
} }
################################################################################
## SUB check_ssleay_version
## Print a message if the installed version of Net::SSLeay may leak memory.
################################################################################
sub check_ssleay_version {
eval {
require Net::SSLeay;
return unless defined($Net::SSLeay::VERSION) && $Net::SSLeay::VERSION =~ m/^(\d+)\.(\d+)/ && $1 <= 1 && $2 < 88;
print_log ("Net::SSLeay version $Net::SSLeay::VERSION detected. Versions prior to 1.88 may leak memory. To upgrade it see: https://metacpan.org/pod/Net::SSLeay");
};
}
################################################################################ ################################################################################
# Main # Main
################################################################################ ################################################################################
@ -1753,12 +1766,20 @@ if ($> == 0 && $^O ne 'MSWin32') {
# Parse command line options # Parse command line options
parse_options (); parse_options ();
# Try to open the log file.
if (defined($log_file)) {
open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n");
close($fh);
}
# Check command line arguments # Check command line arguments
if ($#ARGV != -1) { if ($#ARGV != -1) {
print_help (); print_help ();
exit 1; exit 1;
} }
check_ssleay_version() if $t_ssl == 1;
# Show IPv6 status # Show IPv6 status
if ($SOCKET_MODULE eq 'IO::Socket::INET') { if ($SOCKET_MODULE eq 'IO::Socket::INET') {
print_log ("IO::Socket::INET6 is not found. IPv6 is disabled."); print_log ("IO::Socket::INET6 is not found. IPv6 is disabled.");

View File

@ -5,7 +5,7 @@
# Tentacle have IANA assigned port tpc/41121 as official port. # Tentacle have 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-2022 Artica Soluciones Tecnologicas S.L
# #
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
# protocol description. # protocol description.
@ -1766,6 +1766,12 @@ if ($> == 0 && $^O ne 'MSWin32') {
# Parse command line options # Parse command line options
parse_options (); parse_options ();
# Try to open the log file.
if (defined($log_file)) {
open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n");
close($fh);
}
# Check command line arguments # Check command line arguments
if ($#ARGV != -1) { if ($#ARGV != -1) {
print_help (); print_help ();

View File

@ -119,7 +119,6 @@ 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 Tentacle port is not used."
rc_failed 7 # program not running rc_failed 7 # program not running
fi fi

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
# Tentacle have IANA assigned port tpc/41121 as official port. # Tentacle have 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-2021 Artica Soluciones Tecnologicas S.L # Copyright (c) 2005-2022 Artica Soluciones Tecnologicas S.L
# #
# tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for # tentacle_server.pl Tentacle Server. See https://pandorafms.com/docs/ for
# protocol description. # protocol description.
@ -230,7 +230,6 @@ sub print_help {
print ("\t-p port\t\tPort to listen on (default $t_port).\n"); print ("\t-p port\t\tPort to listen on (default $t_port).\n");
print ("\t-q\t\tQuiet. Do now print error messages.\n"); print ("\t-q\t\tQuiet. Do now print error messages.\n");
print ("\t-r number\tNumber of retries for network opertions (default $t_retries).\n"); print ("\t-r number\tNumber of retries for network opertions (default $t_retries).\n");
print ("\t-s Storage directory\n");
print ("\t-S (install|uninstall|run) Manage the win32 service.\n"); print ("\t-S (install|uninstall|run) Manage the win32 service.\n");
print ("\t-t time\t\tTime-out for network operations in seconds (default ${t_timeout}s).\n"); print ("\t-t time\t\tTime-out for network operations in seconds (default ${t_timeout}s).\n");
print ("\t-v\t\tBe verbose (display errors).\n"); print ("\t-v\t\tBe verbose (display errors).\n");
@ -1767,6 +1766,12 @@ if ($> == 0 && $^O ne 'MSWin32') {
# Parse command line options # Parse command line options
parse_options (); parse_options ();
# Try to open the log file.
if (defined($log_file)) {
open(my $fh, ">>", $log_file) || die("Error opening the log file '$log_file': $!.\n");
close($fh);
}
# Check command line arguments # Check command line arguments
if ($#ARGV != -1) { if ($#ARGV != -1) {
print_help (); print_help ();

View File

@ -119,7 +119,6 @@ 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 Tentacle port is not used."
rc_failed 7 # program not running rc_failed 7 # program not running
fi fi