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

Resolved Force new subscriptions to use slave dns instead of master

Discussion in 'Plesk 12.x for Linux' started by Jonatan_Grim, Jun 9, 2016.

  1. Jonatan_Grim

    Jonatan_Grim New Pleskian

    5
    20%
    Joined:
    Mar 25, 2015
    Messages:
    10
    Likes Received:
    1
    Hello,

    How do I change the defaults of the subscriptions DNS?
    I tried the DNS Templates in Tools, but that does not seem to fit.

    What I want to do is that all new subscriptions should use slave DNS with a pre-defined IP-Record (xxx.xxx.xxx.xxx) instead of master.

    How do I do this?

    Thanks
    - Jonatan
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    You can try to use Event Manager with the event like "Default domain created". As command for this event, you can use

    # plesk bin dns

    with option --set-slave and maybe something else.
     
  3. Jonatan_Grim

    Jonatan_Grim New Pleskian

    5
    20%
    Joined:
    Mar 25, 2015
    Messages:
    10
    Likes Received:
    1
    Hi Igor,

    I can't seem to find any information explaining how the # plesk bin dns works. I tried to test it through SSH but all I get is:
    Code:
    Wrong syntax for command's "--set-slave" parameter
    
    exit status 1
    I have tried:
    # plesk bin dns --set-slave x.x.x.x
    # plesk bin dns --set-slave -ip x.x.x.x
    # plesk bin dns --set-slave -nameserver x.x.x.x
    # plesk bin dns --set-slave -a x.x.x.x

    Can you point me in the right direction? Thanks.
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Have you read correct syntax of command in the output of

    # plesk bin dns --help

    command?
     
  5. Jonatan_Grim

    Jonatan_Grim New Pleskian

    5
    20%
    Joined:
    Mar 25, 2015
    Messages:
    10
    Likes Received:
    1
    So, I read the help as you suggested and figured out how it worked.
    I thought I could set the primary ip along as I set the slave, but that wasnt the case.

    I got it to work in terminal by doing this:
    # plesk bin dns --set-slave test.com
    # plesk bin dns --add test.com -primary 1.1.1.1

    But I cant get it to work in event manager.
    The command requires the domain between -add and -primary, but how do I set it in the event-command? Is there a variable that I can use in the command?

    My current event that is not working:
    (The subscription is already slave, so that is not the problem)

    [​IMG]
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  7. Jonatan_Grim

    Jonatan_Grim New Pleskian

    5
    20%
    Joined:
    Mar 25, 2015
    Messages:
    10
    Likes Received:
    1
  8. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,572
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Try to use
    "$NEW_DOMAIN_NAME"
     
  9. Jonatan_Grim

    Jonatan_Grim New Pleskian

    5
    20%
    Joined:
    Mar 25, 2015
    Messages:
    10
    Likes Received:
    1
    Worked!
    (But had to change user from bin to root)
     
Loading...