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 .="##\n"; |
209 |
$OUT .="##\n"; |
210 |
+ $OUT .="\n"; |
211 |
} |
212 |
} |
213 |
} |
214 |
} |
215 |
|
216 |
+ |
217 |
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 |
218 |
--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 2024-04-07 08:54:01.996517416 +0100 |
219 |
+++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 1970-01-01 01:00:00.000000000 +0100 |
220 |
@@ -1,101 +0,0 @@ |
221 |
-{ |
222 |
- use strict; |
223 |
- use esmith::util; |
224 |
- use esmith::ConfigDB; |
225 |
- use esmith::AccountsDB; |
226 |
- |
227 |
- $OUT=''; |
228 |
- |
229 |
- my $conf = esmith::ConfigDB->open() |
230 |
- or die "Unable to open configuration db"; |
231 |
- |
232 |
- my $edb; |
233 |
- |
234 |
- $edb = esmith::ConfigDB->open('/home/e-smith/db/ddclient') |
235 |
- or $edb = esmith::ConfigDB->create('/home/e-smith/db/ddclient'); |
236 |
- |
237 |
- #------------------------------------------------------------ |
238 |
- # Look up domains and domain descriptions |
239 |
- #------------------------------------------------------------ |
240 |
- |
241 |
- my $key; |
242 |
- my @virtualDomains = (); |
243 |
- foreach my $domain ($edb->get_all_by_prop(type=>'ddhost')) |
244 |
- { |
245 |
- $key = $domain->key; |
246 |
- push (@virtualDomains, $key); |
247 |
- } |
248 |
- |
249 |
- my $numDomains = @virtualDomains; |
250 |
- if ($numDomains > 0) { |
251 |
- foreach my $dom (sort @virtualDomains) |
252 |
- { |
253 |
- my $edom=$edb->get($dom); |
254 |
- |
255 |
- if( defined $edom ) |
256 |
- { |
257 |
- my $dns = $edom->prop('dns'); |
258 |
- $dns =~ tr/a-z/A-Z/; |
259 |
- my $login = $edom->prop('login'); |
260 |
- my $password = $edom->prop('password'); |
261 |
- my $customdns = $edom->prop('customdns') || ''; |
262 |
- my $customprotocol = $edom->prop('customprotocol') || ''; |
263 |
- |
264 |
- # Not sure if wee need these either! |
265 |
- my $static=$edom->prop('static') || ''; |
266 |
- my $custom=$edom->prop('custom') || ''; |
267 |
- my $wildcard=$edom->prop('wildcard') || ''; |
268 |
- my $backupmx=$edom->prop('backupmx') || ''; |
269 |
- |
270 |
- my $mx=$edom->prop('mx') || ''; |
271 |
- my $protocol=$dns; |
272 |
- my $explain='## '.$edom->prop('dns').' dynamic address'; |
273 |
- |
274 |
- if($dns ne '') |
275 |
- { |
276 |
- $OUT .="##\n"; |
277 |
- $OUT .=$explain."\n"; |
278 |
- $OUT .="##\n"; |
279 |
- # $OUT .="server=".$pubserv.", \\\n"; # not needed for v3.11.1 |
280 |
- $OUT .="protocol=".$protocol.", \\\n"; |
281 |
- #if( $dns eq 'DTDNS' ) { |
282 |
- #$OUT .="client=ddclient, \\\n"; |
283 |
- #} |
284 |
- #if( $dns eq 'LOOPIA' ) { |
285 |
- #$OUT .="use=web, \\\n"; |
286 |
- #$OUT .="web=loopia, \\\n"; |
287 |
- #$OUT .="script=/XDynDNSServer/XDynDNS.php, \\\n"; |
288 |
- #} |
289 |
- if($static ne '') { |
290 |
- $OUT .="static=".$static.", \\\n"; |
291 |
- } |
292 |
- |
293 |
- if($wildcard ne '') { |
294 |
- $OUT .="wildcard=".$wildcard.", \\\n"; |
295 |
- } |
296 |
- |
297 |
- if($custom ne '') { |
298 |
- $OUT .="custom=".$custom.", \\\n"; |
299 |
- } |
300 |
- |
301 |
- if ($mx ne '') { |
302 |
- $OUT .="mx=".$mx.", \\\n"; |
303 |
- } |
304 |
- |
305 |
- $OUT .="login=".$login.", \\\n"; |
306 |
- $OUT .="password=".$password." \\\n"; |
307 |
- |
308 |
- # $OUT .="\@\n" if ( $dns eq 'NAMECHEAP' ); |
309 |
- $OUT .=$edom->key()."\n"; # if ( $dns ne 'NAMECHEAP' ); |
310 |
- $OUT .="##\n"; |
311 |
- $OUT .="##\n"; |
312 |
- } |
313 |
- } |
314 |
- } |
315 |
- } |
316 |
- my $file = '/var/cache/ddclient/ddclient.cache'; |
317 |
- # Execute the shell command to clear the file |
318 |
- system("rm -f '' > $file"); |
319 |
- |
320 |
-} |
321 |
- |
322 |
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 |
323 |
--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/web/functions/ddclient 2024-04-07 08:54:01.893514391 +0100 |
324 |
+++ smeserver-ddclient-1.3.0/root/etc/e-smith/web/functions/ddclient 2024-04-07 08:58:41.524727154 +0100 |
325 |
@@ -472,7 +472,7 @@ |
326 |
foreach my $domain (sort @FreeDomains) { |
327 |
my $vals = $edb->get($domain); |
328 |
my $content = $vals->prop('desc'); |
329 |
- my $publish = $vals->prop('dns'); |
330 |
+ my $publish = $fm->localise($vals->prop('dns')); |
331 |
print $q->Tr (esmith::cgi::genSmallCell ($q, $domain), |
332 |
esmith::cgi::genSmallCell ($q, $content), |
333 |
esmith::cgi::genSmallCell ($q, $publish), |