initial commit of file from CVS for smeserver-support on Mon 10 Jul 08:43:33 BST 2023

This commit is contained in:
Brian Read
2023-07-10 08:43:33 +01:00
parent f3dcd239bb
commit 56eab664a2
40 changed files with 2032 additions and 2 deletions

View File

@@ -0,0 +1,44 @@
package esmith::console::support;
use strict;
use warnings;
use esmith::console;
use Locale::gettext;
sub new
{
my $class = shift;
my $self = {
name => gettext('View support and licensing information'),
order => 60,
};
bless $self, $class;
return $self;
}
sub name
{
return $_[0]->{name};
}
sub order
{
return $_[0]->{order};
}
sub doit
{
#------------------------------------------------------------
# SUPPORT:
#------------------------------------------------------------
my ($self, $console, $db) = @_;
my $licenseFile = esmith::util::getLicenseFile();
my ($rc, $choice) = $console->textbox
(
title => gettext('Support and licensing information'),
file => $licenseFile,
);
return;
}
return esmith::console::support->new;

View File

@@ -0,0 +1,77 @@
package esmith::console::testInternetAccess;
use esmith::console;
use Locale::gettext;
sub new
{
my $class = shift;
my $self = {
name => gettext("Test Internet access"),
order => 30,
};
bless $self, $class;
return $self;
}
sub name
{
return $_[0]->{name};
}
sub order
{
return $_[0]->{order};
}
sub doit
{
my $console = new esmith::console;
($rc, $choice) = $console->yesno_page
(
title => gettext("Test Internet access"),
text =>
gettext("After your Internet connection is operational and your server has been connected and configured, this test will verify that your server can communicate with the Internet.") .
"\n\n" .
gettext("As part of this test, two pieces of information will be sent to koozali.org - the version installed on your server and a string used to differentiate your server from others using this test. This string is generated by a one-way hash function and access to the string does not provide any information about your server.") .
"\n\n" .
gettext("We appreciate your assistance in sending this information so we can gain an accurate count of the installed servers.") .
"\n\n" .
gettext("Do you wish to run the test?"),
);
return unless ($rc == 0);
print '-' x 75 . "\n";
print gettext("Attempting to test Internet connection.") . "\n";
print gettext("If this test takes too long, please halt it by typing Ctrl-C.") . "\n";
print '-' x 75 . "\n";
if (system("/sbin/e-smith/statusreport") == 0)
{
($rc, $choice) = $console->message_page
(
title => gettext("Internet connection successful"),
text =>
gettext("The test was successful! Your server was able to communicate with koozali.org."),
);
}
else
{
($rc, $choice) = $console->message_page
(
title => gettext("Internet connection failed"),
text =>
gettext("The test failed. Your server was unable to establish contact with koozali.org via the Internet.") .
"\n\n" .
gettext("Please check that your server is correctly configured. A reboot may be required if certain settings are modified and the configuration process will advise you if this is required.") .
"\n\n" .
gettext("You might also want to check with your Internet provider to make sure that your Internet connection is working properly.") .
"\n\n" .
gettext("It is also possible (although unlikely) that there is a technical problem at the koozali.org site. In this case, you should proceed with your installation and run this test again later."),
);
}
}
new esmith::console::testInternetAccess;