Update dns for all domains over cli
Add a possibility to update certain records (for instance, NS servers) over CLI for all domains.
Using "plesk bin server_dns" may update DNS template (even though, there is no option to remove any specific record, except for re-writing all the template using "set" parameter), but no option to apply changes in DNS Template for domains.
"plesk bin dns" sets records for individual domains.
1
vote
B
shared this idea
You can use following command in CLI for mass dns records update:
Delete records first with
- for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e “select name from domains”`; do /usr/local/psa/bin/dns -d $i …… ;done
Then add it for all domains with
- for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e “select name from domains”`; do /usr/local/psa/bin/dns -a $i….. ;done
Modify options for dns command as you want.
—
IG