/[smecontribs]/rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.3.0-Fix-template-declaration-file-and-localise-table-sm1.patch
ViewVC logotype

Contents of /rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.3.0-Fix-template-declaration-file-and-localise-table-sm1.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sun Apr 7 21:21:50 2024 UTC (3 weeks, 3 days ago) by jpp
Branch: MAIN
CVS Tags: smeserver-ddclient-1_3_0-32_el7_sme, smeserver-ddclient-1_3_0-31_el7_sme, HEAD
Changes since 1.1: +2 -1 lines
* Sun Apr 07 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.3.0-31.sme
- add fix for namecheap to last patch [SME: 12598]

1 diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/20Declaration smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/20Declaration
2 --- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/20Declaration 2024-04-07 08:54:01.988517181 +0100
3 +++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/20Declaration 2024-04-07 08:56:01.023013221 +0100
4 @@ -5,7 +5,54 @@
5
6 my $ddb = esmith::DomainsDB->open_ro();
7
8 - for my $edom ( $ddb->domains )
9 + my $edb;
10 +
11 + $edb = esmith::ConfigDB->open('/home/e-smith/db/ddclient')
12 + or $edb = esmith::ConfigDB->create('/home/e-smith/db/ddclient');
13 +
14 + #------------------------------------------------------------
15 + # Look up domains and domain descriptions
16 + #------------------------------------------------------------
17 +
18 +
19 + my %DDNS = (
20 + DYNDNS1=> dyndns2,
21 + DYNDNS2=>dyndns2,
22 + DYNDNS3=>dyndns2,
23 + ZONEDIT=>zoneedit1,
24 + EASYDNS=>easydns,
25 + HAMMER=>hammernode1,
26 + DSLREPORTS=>dslreports1,
27 + EURODYNDNS=>namecheap,
28 + DTDNS=>dtdns,
29 + LOOPIA=>dyndns2,
30 + DNSPARK=>dyndns2,
31 + DYNHOST=>dyndns2,
32 + NOIP=>noip,
33 + CHANGEIP=>dyndns2,
34 + NAMECHEAP=>namecheap,
35 + SPDNS=>dyndns2,
36 + );
37 + my %DDSERV= (
38 + DYNDNS1=> 'members.dyndns.org',
39 + DYNDNS2=>'members.dyndns.org',
40 + DYNDNS3=>'members.dyndns.org',
41 + ZONEDIT=>'dynamic.zoneedit.com',
42 + EASYDNS=>'members.easydns.com',
43 + HAMMER=>'dup.hn.org',
44 + DSLREPORTS=>'members.dslreports.com',
45 + EURODYNDNS=>'eurodyndns.org',
46 + DTDNS=>'www.dtdns.com',
47 + LOOPIA=>'dns.loopia.se',
48 + DNSPARK=>'www.dnspark.com',
49 + DYNHOST=>'www.ovh.com',
50 + NOIP=>'dynupdate.no-ip.com',
51 + CHANGEIP=>'nic.changeip.com',
52 + NAMECHEAP=>'dynamicdns.park-your-domain.com',
53 + SPDNS=>'update.spdyn.de',
54 + );
55 +
56 + for my $edom ( $ddb->domains , $edb->get_all_by_prop(type=>'ddhost') )
57 {
58 {
59
60 @@ -18,7 +65,9 @@
61 my $customdns = $edom->prop('customdns') || '';
62 my $customprotocol = $edom->prop('customprotocol') || '';
63
64 - # my $pubserv=''; #nbot needed for v3.11.1
65 + my $pubserv="";
66 + $pubserv= $DDSERV{$dns} if exists $DDSERV{$dns}; #not needed for v3.11.1 => yes it is
67 + $pubserv= $customdns if( $dns eq 'CUSTOMDNS' );
68 # Not sure if wee need these either!
69 my $static=$edom->prop('static') || '';
70 my $custom=$edom->prop('custom') || '';
71 @@ -27,128 +76,15 @@
72
73 my $mx=$edom->prop('mx') || '';
74 my $protocol=$dns;
75 + $protocol = $DDNS{$dns} if exists $DDNS{$dns};
76 my $explain='## '.$edom->prop('dns').' dynamic address';
77
78 - #if( $dns eq 'DYNDNS1')
79 - #{
80 - #$explain='## dyndns.org dynamic addresses';
81 - #$pubserv ='members.dyndns.org';
82 - #$protocol='dyndns2';
83 - #$static='no';
84 - #$custom='no';
85 - #$wildcard='yes';
86 - #}
87 - #elsif( $dns eq 'DYNDNS2')
88 - #{
89 - #$explain='## dyndns.org static addresses';
90 - #$pubserv ='members.dyndns.org';
91 - #$protocol='dyndns2';
92 - #$static ='yes';
93 - #$custom ='no';
94 - #$wildcard='yes';
95 - #}
96 - #elsif( $dns eq 'DYNDNS3')
97 - #{
98 - #$explain='## dyndns.org static2 addresses';
99 - #$pubserv='members.dyndns.org';
100 - #$custom ='yes';
101 - #$protocol='dyndns2';
102 - #$static ='';
103 - #$wildcard='yes';
104 - #}
105 - #elsif( $dns eq 'ZONEDIT')
106 - #{
107 - #$explain='## zoneedit dynamic addresses';
108 - #$pubserv='dynamic.zoneedit.com';
109 - #$protocol='zoneedit1';
110 - #}
111 - #elsif( $dns eq 'EASYDNS')
112 - #{
113 - #$explain='## easydns.com dynamic addresses';
114 - #$pubserv='members.easydns.com';
115 - #$protocol='easydns';
116 - #}
117 - #elsif( $dns eq 'HAMMER')
118 - #{
119 - #$explain='## hammer dup.hn.org dynamic addresses';
120 - #$pubserv='dup.hn.org';
121 - #$protocol='hammernode1';
122 - #}
123 - #elsif( $dns eq 'DSLREPORTS' )
124 - #{
125 - #$explain='## dslreports.org dynamic addresses';
126 - #$pubserv='members.dslreports.com';
127 - #$protocol='dslreports1';
128 - #}
129 - #elsif( $dns eq 'EURODYNDNS' )
130 - #{
131 - #$explain='## euroddyndns.org dynamic addresses';
132 - #$pubserv='eurodyndns.org';
133 - #$protocol='namecheap';
134 - #}
135 - #elsif( $dns eq 'DTDNS' )
136 - #{
137 - #$explain='## DtDNS (www.dtdns.com) dynamic addresses';
138 - #$pubserv='www.dtdns.com';
139 - #$protocol='dtdns';
140 - #}
141 - #elsif( $dns eq 'LOOPIA' )
142 - #{
143 - #$explain='## Loopia (loopia.se) dynamic addresses';
144 - #$pubserv='dns.loopia.se';
145 - #$protocol='dyndns2';
146 - #}
147 - #elsif( $dns eq 'DNSPARK' )
148 - #{
149 - #$explain='## dnspark.com dynamic addresses';
150 - #$pubserv='www.dnspark.com';
151 - #$protocol='dnspark';
152 - #}
153 - #elsif( $dns eq 'DYNHOST' )
154 - #{
155 - #$explain='## DynHost (ovh.com) dynamic addresses';
156 - #$pubserv='www.ovh.com';
157 - #$protocol='dyndns2';
158 - #}
159 - #elsif( $dns eq 'NOIP' )
160 - #{
161 - #$explain='## Noip (noip.com) dynamic addresses';
162 - #$pubserv='dynupdate.no-ip.com';
163 - #$protocol='noip';
164 - #}
165 - #elsif( $dns eq 'CHANGEIP' )
166 - #{
167 - #$explain='## ChangeIP (changeip.com) dynamic addresses';
168 - #$pubserv='nic.changeip.com';
169 - #$protocol='dyndns2';
170 - #}
171 -
172 - #elsif( $dns eq 'NAMECHEAP' )
173 - #{
174 - #$explain='## NAMECHEAP (namecheap.com) dynamic addresses';
175 - #$pubserv='dynamicdns.park-your-domain.com';
176 - #$protocol='namecheap';
177 - #}
178 -
179 - #elsif( $dns eq 'SPDNS' )
180 - #{
181 - #$explain='## SPDNS (spdyn.de FORMER spdns.de) dynamic addresses';
182 - #$pubserv='update.spdyn.de'; # update.spdyn.de (IPv4 + IPv6) update4.spdyn.de (IPv4 only) update6.spdyn.de (IPv6 only)
183 - #$protocol='dyndns2';
184 - #}
185 - #elsif( $dns eq 'CUSTOMDNS' )
186 - #{
187 - #$explain='## CUSTOMDNS PROVIDER dynamic addresses';
188 - #$pubserv= $customdns;
189 - #$protocol= $customprotocol;
190 - #}
191 -
192 if($dns ne '')
193 {
194 $OUT .="##\n";
195 $OUT .=$explain."\n";
196 $OUT .="##\n";
197 - # $OUT .="server=".$pubserv.", \\\n"; # not needed for v3.11.1
198 + $OUT .="server=".$pubserv.", \\\n"; # not needed for v3.11.1; is needed
199 $OUT .="protocol=".$protocol.", \\\n";
200 #if( $dns eq 'DTDNS' ) {
201 #$OUT .="client=ddclient, \\\n";
202 @@ -177,12 +113,13 @@
203 $OUT .="login=".$login.", \\\n";
204 $OUT .="password=".$password." \\\n";
205
206 - # $OUT .="\@\n" if ( $dns eq 'NAMECHEAP' );
207 - $OUT .=$edom->key()."\n"; # if ( $dns ne 'NAMECHEAP' );
208 + $OUT .= ( $dns ne 'NAMECHEAP' ) ? "\@\n": $edom->key()."\n";
209 $OUT .="##\n";
210 $OUT .="##\n";
211 + $OUT .="\n";
212 }
213 }
214 }
215 }
216
217 +
218 diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts
219 --- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 2024-04-07 08:54:01.996517416 +0100
220 +++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 1970-01-01 01:00:00.000000000 +0100
221 @@ -1,101 +0,0 @@
222 -{
223 - use strict;
224 - use esmith::util;
225 - use esmith::ConfigDB;
226 - use esmith::AccountsDB;
227 -
228 - $OUT='';
229 -
230 - my $conf = esmith::ConfigDB->open()
231 - or die "Unable to open configuration db";
232 -
233 - my $edb;
234 -
235 - $edb = esmith::ConfigDB->open('/home/e-smith/db/ddclient')
236 - or $edb = esmith::ConfigDB->create('/home/e-smith/db/ddclient');
237 -
238 - #------------------------------------------------------------
239 - # Look up domains and domain descriptions
240 - #------------------------------------------------------------
241 -
242 - my $key;
243 - my @virtualDomains = ();
244 - foreach my $domain ($edb->get_all_by_prop(type=>'ddhost'))
245 - {
246 - $key = $domain->key;
247 - push (@virtualDomains, $key);
248 - }
249 -
250 - my $numDomains = @virtualDomains;
251 - if ($numDomains > 0) {
252 - foreach my $dom (sort @virtualDomains)
253 - {
254 - my $edom=$edb->get($dom);
255 -
256 - if( defined $edom )
257 - {
258 - my $dns = $edom->prop('dns');
259 - $dns =~ tr/a-z/A-Z/;
260 - my $login = $edom->prop('login');
261 - my $password = $edom->prop('password');
262 - my $customdns = $edom->prop('customdns') || '';
263 - my $customprotocol = $edom->prop('customprotocol') || '';
264 -
265 - # Not sure if wee need these either!
266 - my $static=$edom->prop('static') || '';
267 - my $custom=$edom->prop('custom') || '';
268 - my $wildcard=$edom->prop('wildcard') || '';
269 - my $backupmx=$edom->prop('backupmx') || '';
270 -
271 - my $mx=$edom->prop('mx') || '';
272 - my $protocol=$dns;
273 - my $explain='## '.$edom->prop('dns').' dynamic address';
274 -
275 - if($dns ne '')
276 - {
277 - $OUT .="##\n";
278 - $OUT .=$explain."\n";
279 - $OUT .="##\n";
280 - # $OUT .="server=".$pubserv.", \\\n"; # not needed for v3.11.1
281 - $OUT .="protocol=".$protocol.", \\\n";
282 - #if( $dns eq 'DTDNS' ) {
283 - #$OUT .="client=ddclient, \\\n";
284 - #}
285 - #if( $dns eq 'LOOPIA' ) {
286 - #$OUT .="use=web, \\\n";
287 - #$OUT .="web=loopia, \\\n";
288 - #$OUT .="script=/XDynDNSServer/XDynDNS.php, \\\n";
289 - #}
290 - if($static ne '') {
291 - $OUT .="static=".$static.", \\\n";
292 - }
293 -
294 - if($wildcard ne '') {
295 - $OUT .="wildcard=".$wildcard.", \\\n";
296 - }
297 -
298 - if($custom ne '') {
299 - $OUT .="custom=".$custom.", \\\n";
300 - }
301 -
302 - if ($mx ne '') {
303 - $OUT .="mx=".$mx.", \\\n";
304 - }
305 -
306 - $OUT .="login=".$login.", \\\n";
307 - $OUT .="password=".$password." \\\n";
308 -
309 - # $OUT .="\@\n" if ( $dns eq 'NAMECHEAP' );
310 - $OUT .=$edom->key()."\n"; # if ( $dns ne 'NAMECHEAP' );
311 - $OUT .="##\n";
312 - $OUT .="##\n";
313 - }
314 - }
315 - }
316 - }
317 - my $file = '/var/cache/ddclient/ddclient.cache';
318 - # Execute the shell command to clear the file
319 - system("rm -f '' > $file");
320 -
321 -}
322 -
323 diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/web/functions/ddclient smeserver-ddclient-1.3.0/root/etc/e-smith/web/functions/ddclient
324 --- smeserver-ddclient-1.3.0.old/root/etc/e-smith/web/functions/ddclient 2024-04-07 08:54:01.893514391 +0100
325 +++ smeserver-ddclient-1.3.0/root/etc/e-smith/web/functions/ddclient 2024-04-07 08:58:41.524727154 +0100
326 @@ -472,7 +472,7 @@
327 foreach my $domain (sort @FreeDomains) {
328 my $vals = $edb->get($domain);
329 my $content = $vals->prop('desc');
330 - my $publish = $vals->prop('dns');
331 + my $publish = $fm->localise($vals->prop('dns'));
332 print $q->Tr (esmith::cgi::genSmallCell ($q, $domain),
333 esmith::cgi::genSmallCell ($q, $content),
334 esmith::cgi::genSmallCell ($q, $publish),

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed