Hyperactive Inc.
Please Login or Register

Knowledgebase

How do i manually rebuilt the named.conf file on my Plesk dedicated server?

It can be done with the following script, simply save this into a file called rebuild_named.sh or anything you like, then execute it while logged in as root to your server:

#!/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


**Use these commands at your own risk. These commands can vary from distro to distro. Always consult your documentation for your distribution of Linux for the correct commands**



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article


Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search