Update letsencrypt and take out spurious chars in html cxontrols

This commit is contained in:
2024-11-27 16:18:56 +00:00
parent edb245df07
commit 1c275912e3
9 changed files with 100 additions and 89 deletions

View File

@@ -52,8 +52,7 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
my $c = shift;
my $prefix_data = shift; #Data hash as parameter
# Validation for each field
my $ret = "";
my $ret = "Error from params";
if (! TRUE) #validate $c->param('status')
{$ret .= 'Validation for status failed';}
if (! TRUE) #validate $c->param('hookScript')
@@ -435,33 +434,4 @@ sub get_my_ip
my $output = `/usr/sbin/e-smith/getmyip`;
return $output || "IP";
}
sub update_one_domain
{
my $self = shift;
my $q = $self->{cgi};
my $domain = $q->param('Domain');
return "$domain not domain" unless ($ddb->get($domain) || $hdb->get($domain));
($domain) = ($domain =~ /([\w\p{L}.]+)/);
my $output = `/etc/e-smith/events/actions/letsencrypt-setdomains " " $domain `;
return $output || "-empty-";
}
sub update_all_domains
{
my $self = shift;
my $q = $self->{cgi};
my $output = `/etc/e-smith/events/actions/letsencrypt-setdomains "" "" all `;
return $output || "-empty-";
}
sub update_enabled_domains
{
my $self = shift;
my $q = $self->{cgi};
my $output = `/etc/e-smith/events/actions/letsencrypt-setdomains "" "" enabled `;
return $output || "-empty-";
}
1;
1;