• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

dns.sh useless?

G

grnserveis

Guest
In plesk 7, this (http://kb.swsoft.com/en/154) worked like a charm. supposedly in plesk 8.2 there is dns.sh that does that and much more...
When I delete a ns record using the dns.sh it tells me everything is fine. Adn dns.sh --info tells me the same, BUT...

No changes in /var/named/run-root/var/* neither in the web interface.

Anyone knows the step I'm missing?

Thanks
 
Originally posted by grnserveis
In plesk 7, this (http://kb.swsoft.com/en/154) worked like a charm. supposedly in plesk 8.2 there is dns.sh that does that and much more...
When I delete a ns record using the dns.sh it tells me everything is fine. Adn dns.sh --info tells me the same, BUT...

No changes in /var/named/run-root/var/* neither in the web interface.

Anyone knows the step I'm missing?

Thanks

Plesk CLI dns.sh adds DNS records into Plesk database (in table psa.dns.recs) and reloads DNS zone automatically.
If it does not in your case, try reloading zone with 'dnsmng update' as specified in the knowledge base article.

You may verify that Plesk CLI dns.sh does not reload DNS zone as below. Add a new DNS record, examine Plesk database and the zone file then:

~# /usr/local/psa/bin/dns --add DOMAIN.TLD -cname TEST_CNAME -canonical DOMAIN.TLD

~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql> select domains.name, dns_recs.host, dns_recs.val, dns_recs.time_stamp from dns_recs, domains where domains.dns_zone_id=dns_recs.dns_zone_id and domains.name='DOMAIN.TLD';

~# cat /var/named/run-root/var/DOMAIN.TLD

then try reload the DNS zone:

~# /usr/local/psa/admin/sbin/dnsmng update DOMAIN.TLD

and check records in the DNS zone again.

Plesk CLI dns.sh does not reload zone after modifying it ib case it has obtained duplicate DNS records for the domain.
This could happen in case the domain has several subdomains, domain aliases or other domains with "similar" names exist in Plesk..
Combination of all these records prevents Plesk CLI from reloading DNS zone.

And of cause you should use the latest psa-api packages that provide dns.sh. Check SWsoft autoinstaller site for your operating system type and Plesk version:

http://autoinstall.plesk.com

./anb
 
Sorry for the late answer.

The command I saw reading documentation + some forums was this one
/opt/psa/bin/dns.sh --del example.com -ns "" -nameserver "dns3.example.com"

After that, doing /opt/psa/bin/dns.sh --info example.com tells me everything is changed properly.

But if I do cat /var/named/run-root/var/example.com I still can see dns3.example.com com listed as a dns.

And I couldn't do the dnsmng because after doing an updatedb and a "locate dnsmng" the only thing I could find was /opt/psa/admin/plib/class.dnsmng.php

But now, I looked directly in the folder where it is supposed to be and HEY, it was there in /opt/psa/admin/sbin/dnsmng

Now it works!

Thanks
 
Back
Top