1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

dns.sh useless?

Discussion in 'Plesk for Linux - 8.x and Older' started by grnserveis, Nov 9, 2007.

  1. grnserveis

    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?

  2. Bender

    Bender Guest

  3. anb_t

    anb_t Guest

    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:


  4. grnserveis

    grnserveis Guest

    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!