3 Commits

Author SHA1 Message Date
6b207dec6b * Sat May 10 2025 Brian Read <brianr@koozali.org> 11.0.0-2.sme
- correct $config (remove $) and get protocols, services and devices by interrogating ddclient [SME: 13001]
2025-05-10 17:03:29 +01:00
6dc6143642 * Sat May 03 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Take out restart for createlinks for bootstrap-console-save [SME: 12998]
- and update version
2025-05-03 19:47:44 +01:00
f52453061f Update README with specific Bugzilla links 2024-10-27 15:42:57 +00:00
7 changed files with 70 additions and 11 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
*.rpm
*.log
*spec-20*
*.tar.gz
*.tar.xz

View File

@@ -7,7 +7,14 @@ SMEServer Koozali developed git repo for smeserver-ddclient smecontribs
<br />https://wiki.koozali.org/Ddclient-help
## Bugzilla
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-ddclient&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
Show list of outstanding bugs:
[All](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEEDINFO&bug_status=IN_PROGRESS&bug_status=RESOLVED&bug_status=VERIFIED&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Confirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=CONFIRMED&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Unconfirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Need Info](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=NEEDINFO&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[In Progress](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=IN_PROGRESS&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Verified](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=VERIFIED&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
[Resolved](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=RESOLVED&classification=Contribs&component=smeserver-ddclient&list_id=105781&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&product=SME+Contribs&query_format=advanced)
## Description

View File

@@ -46,7 +46,7 @@ $event = 'domain-modify';
templates2events("/etc/ddclient/ddclient.conf", $event);
$event = 'bootstrap-console-save';
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ddclient");
#safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ddclient"); # Not allowed as creates a systemd loop!
templates2events("/etc/ddclient/ddclient.conf", $event);
$event = 'console-save';

View File

@@ -322,9 +322,9 @@ sub do_display {
domains => \@domains,
freedomains => \@FreeDomains,
methodlabels => $Labels,
dnslabels => get_dns_labels($c),
devices => get_devices_names($c),
webservices => get_web_services_names($c),
dnslabels => ddclient_protocol_options($c),
devices => ddclient_device_options($c),
webservices => ddclient_web_services_options($c),
emptydom => $emptydom,
emptycust => $emptycust
);
@@ -1012,4 +1012,49 @@ sub performDeleteCustom {
return "ok";
}
1;
#Routines to extract protocols, services and devices from ddclient and present them for select options
sub ddclient_web_services_options {
my $output = qx(ddclient -list-web-services 2>/dev/null);
my @options;
for my $line (split /\n/, $output) {
next unless $line =~ /^(\S+)\s+(\S+)/;
my ($service, $url) = ($1, $2);
# You can use the service name as both label and value, or include the URL in the label for clarity
push @options, [ "$service ($url)", $service ];
}
return \@options;
}
sub ddclient_protocol_options {
my $output = qx(ddclient -list-protocols 2>/dev/null);
my @options;
for my $line (split /\n/, $output) {
$line =~ s/^\s+|\s+$//g; # Trim whitespace
next unless $line; # Skip empty lines
push @options, [ $line, $line ]; # [label, value]
}
return \@options;
}
sub ddclient_device_options {
my $output = qx(ddclient -list-devices 2>/dev/null);
my @options;
for my $line (split /\n/, $output) {
$line =~ s/^\s+|\s+$//g; # Trim whitespace
next unless $line; # Skip empty lines
my ($id, $name) = split(/\s+/, $line, 2);
next unless $id && $name;
push @options, [ $name, $id ]; # [label, value]
}
return \@options;
}
1;

View File

@@ -3,7 +3,7 @@
% content_for 'module' => begin
<div id="module" class="module ddclient-panel">
% if ($config->{debug} == 1) {
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
@@ -45,4 +45,4 @@
%}
</div>
%end
%end

Binary file not shown.

View File

@@ -3,8 +3,8 @@
# Name: Stephen Noble
%define name smeserver-ddclient
%define version 1.3.0
%define release 36
%define version 11.0.0
%define release 2
Summary: ddclient panel for SME Server
Name: %{name}
@@ -25,6 +25,13 @@ Requires: smeserver-formmagick
AutoReqProv: no
%changelog
* Sat May 10 2025 Brian Read <brianr@koozali.org> 11.0.0-2.sme
- correct $config (remove $) and get protocols, services and devices by interrogating ddclient [SME: 13001]
* Sat May 03 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Take out restart for createlinks for bootstrap-console-save [SME: 12998]
- and update version
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 1.3.0-36.sme
- Fix e-smith references in smeserver-ddclient [SME: 12732]