Update all domain zones at once
If you've updated Plesk DNS stuff directly from the database you'll want to rebuild the DNS zones so that your changes get applied to the "real" DNS.
I've found this very useful shell script in the SWSoft forums:
#!/bin/sh
ADMIN_PASS=`cat /etc/psa/.psa.shadow`
MYSQL_BIN_D=`grep MYSQL_BIN_D /etc/psa/psa.conf | awk '{print $2}'`
mysql="${MYSQL_BIN_D}/mysql -N -uadmin -p${ADMIN_PASS} psa"
query="select name from domains;"
domains=`echo $query | $mysql `
for i in ${domains}; do
echo "echo $i"
/usr/local/psa/admin/sbin/dnsmng update $i
done
Don't forget to add execution permission to it.
Leave a comment