My /etc/virtual/domains file is empty. How do I rebuild it?

Create a script with the following contents by running:

cd /etc/virtual
vi fix_domains.sh

press i to go into “insert” mode, then paste the following code:

#!/bin/sh

echo `hostname`;

for u in `ls /usr/local/directadmin/data/users`; do
{
   for d in `cat /usr/local/directadmin/data/users/$u/domains.list`; do
   {
     echo "$d"

     for p in `cat /usr/local/directadmin/data/users/$u/domains/$d.pointers 2>/dev/null | cut -d= -f1 2>/dev/null`; do
     {
       echo "$p"
     }
     done;
   }
   done;
}
done;

Press ctrl-c to exit “insert” mode, the press shift-Z twice to save and exit. Once at the prompt, type:

chmod 755 fix_domains.sh
./fix_domains.sh > domains
chmod 644 domains
chown mail:mail domains
 
troubleshooting/empty_files_2.txt · Last modified: 2010/02/21 16:59 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Вода кулеры для воды напольные. Люблино.