Quick Contact

How to change DNS TTL in Hsphere (via psql)



1)Login to cp server and find sql connection details:
             cat ~cpanel/shiva/psoft_config/hsphere.properties | grep DB
____________
2)Login to psql server, and find all domains by user_id:
 
select 
             domains.*
from 
             domains, 
             parent_child 
where 
             domains.id = parent_child.child_id 
             and 
             account_id = domainID
___________
3) Check your selection:
 
 
select * from  dns_records 
where name like '%shik-design.com' or 
name like '%domain' or 
name like '%domain2' or 
 
____________
4) Update the records:
 
update dns_records set ttl=3600
where name like '%Domain' or 
name like '%domain2' or 
 
_____________________________
5) Build the commands for DNS Creator:
 
select 
             'java psoft.hsphere.tools.DNSCreator -m db -dz -z ' || domains.name
from 
             domains, 
             parent_child 
where 
             domains.id = parent_child.child_id 
             and 
             account_id = domainID
______________________________ 6) Replace the "CRLF" with ";" and run the output as cpanel user on the CP server: java psoft.hsphere.tools.DNSCreator -m db -dz -z shik-design.com ;java psoft.hsphere.tools.DNSCreator -m db -dz -z domain ;java psoft.hsphere.tools.DNSCreator -m db -dz -z domain2 ______________________________

 

Additional Articles
X

Partners

© 2013 XGlobe Online Ltd.