1 |
diff -up smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient.extrasmigrate smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient |
diff -up smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient.extrasmigrate smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient |
2 |
--- smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient.extrasmigrate 2013-12-30 14:17:00.000000000 -0500 |
--- smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient.extrasmigrate 2013-12-30 14:17:00.000000000 -0500 |
3 |
+++ smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient 2013-12-30 14:18:10.000000000 -0500 |
+++ smeserver-ddclient-1.0.0/root/etc/e-smith/db/domains/migrate/80ddclient 2013-12-30 14:18:10.000000000 -0500 |
4 |
@@ -0,0 +1,60 @@ |
@@ -0,0 +1,64 @@ |
5 |
+{ |
+{ |
6 |
+my $filename = '/home/e-smith/db/extras'; |
+my $filename = '/home/e-smith/db/extras'; |
7 |
+return 0 |
+return 0 |
25 |
+ my $dnsddhost = $edb->get_prop("$currentdom", "dns"); |
+ my $dnsddhost = $edb->get_prop("$currentdom", "dns"); |
26 |
+ my $mxddhost = $edb->get_prop("$currentdom", "mx"); |
+ my $mxddhost = $edb->get_prop("$currentdom", "mx"); |
27 |
+ my $passwordddhost = $edb->get_prop("$currentdom", "password"); |
+ my $passwordddhost = $edb->get_prop("$currentdom", "password"); |
28 |
|
+ my $login = $edb->get_prop("$currentdom", "login"); |
29 |
+ |
+ |
30 |
+ $domaindb->new_record( "$currentdom" ); |
+ $domaindb->new_record( "$currentdom" ); |
31 |
+ $domaindb->set_value( "$currentdom" , "domain" ); |
+ $domaindb->set_value( "$currentdom" , "domain" ); |
33 |
+ $domaindb->set_prop( "$currentdom" , "dns" , "$dnsddhost" ) if defined $dnsddhost; |
+ $domaindb->set_prop( "$currentdom" , "dns" , "$dnsddhost" ) if defined $dnsddhost; |
34 |
+ $domaindb->set_prop( "$currentdom" , "mx" , "$mxddhost") if defined $mxddhost; |
+ $domaindb->set_prop( "$currentdom" , "mx" , "$mxddhost") if defined $mxddhost; |
35 |
+ $domaindb->set_prop( "$currentdom" , "password" , "$passwordddhost" ) if defined $passwordddhost; |
+ $domaindb->set_prop( "$currentdom" , "password" , "$passwordddhost" ) if defined $passwordddhost; |
36 |
|
+ $domaindb->set_prop( "$currentdom" , "login" , "$login" ) if defined $login; |
37 |
+ # followings set defaults values as a domain pointing to Primary ibay |
+ # followings set defaults values as a domain pointing to Primary ibay |
38 |
+ # as even if they are not configured they will point there ! |
+ # as even if they are not configured they will point there ! |
39 |
+ # Nameservers are defined as internet, as they are dynamic domains, |
+ # Nameservers are defined as internet, as they are dynamic domains, |
53 |
+ my $dnsdomain = $edb->get_prop("$currentdom", "dns"); |
+ my $dnsdomain = $edb->get_prop("$currentdom", "dns"); |
54 |
+ my $mxdomain = $edb->get_prop("$currentdom", "mx"); |
+ my $mxdomain = $edb->get_prop("$currentdom", "mx"); |
55 |
+ my $passworddomain = $edb->get_prop("$currentdom", "password"); |
+ my $passworddomain = $edb->get_prop("$currentdom", "password"); |
56 |
|
+ my $login = $edb->get_prop("$currentdom", "login"); |
57 |
+ |
+ |
58 |
+ #$domaindb->set_prop( "$currentdom" , "desc", "$descdomain" ); |
+ #$domaindb->set_prop( "$currentdom" , "desc", "$descdomain" ); |
59 |
+ $domaindb->set_prop( "$currentdom" , "dns" , "$dnsdomain" ) if defined $dnsdomain; |
+ $domaindb->set_prop( "$currentdom" , "dns" , "$dnsdomain" ) if defined $dnsdomain; |
60 |
+ $domaindb->set_prop( "$currentdom" , "mx" , "$mxdomain" ) if defined $mxdomain; |
+ $domaindb->set_prop( "$currentdom" , "mx" , "$mxdomain" ) if defined $mxdomain; |
61 |
+ $domaindb->set_prop( "$currentdom" , "password" , "$passworddomain" ) if defined $passworddomain; |
+ $domaindb->set_prop( "$currentdom" , "password" , "$passworddomain" ) if defined $passworddomain; |
62 |
|
+ $domaindb->set_prop( "$currentdom" , "login" , "$login" ) if defined $login; |
63 |
+ } |
+ } |
64 |
+ |
+ |
65 |
+system ("/bin/mv $filename /home/e-smith/db/extras-migrated"); |
+system ("/bin/mv $filename /home/e-smith/db/extras-migrated"); |