User Tools

Site Tools


directadmin:build-missing-domainowners

Build Missing Directadmin Domainowners

Jika file domainowners hilang maka untuk rebuild gunakan ini

#!/bin/sh

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: $u"

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

atau kode ini

#!/bin/sh

mkdir /etc/virtual/`hostname`
chown mail:mail /etc/virtual/`hostname`
chmod 711 /etc/virtual/`hostname`
echo `hostname` >> /etc/virtual/domains

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: $u" >> /etc/virtual/domainowners
echo "$d" >> /etc/virtual/domains

DMN=/etc/virtual/$d

mkdir $DMN
chmod 711 $DMN
chown mail:mail $DMN

echo "$u: $u" > $DMN/aliases
echo "" > $DMN/autoresponder.conf
echo "" > $DMN/filter
echo "" > $DMN/filter.conf
echo "" > $DMN/passwd
echo "" > $DMN/quota
echo "" > $DMN/vacation.conf
chown mail:mail $DMN/*

mkdir $DMN/majordomo
chmod 751 $DMN/majordomo
chown majordomo:daemon $DMN/majordomo

mkdir $DMN/reply
chmod 700 $DMN/reply
chown mail:mail $DMN/reply

for p in `cat /usr/local/directadmin/data/users/$u/domains/$d.pointers 2>/dev/null`; do
{
echo "$p: $u" Â >> /etc/virtual/domainowners
echo "$p" >> /etc/virtual/domains
ln -s $d /etc/virtual/$p
}
done;
}
done;
}
done;

chown mail:mail /etc/virtual/domains
chown mail:mail /etc/virtual/domainowners
chmod 644 /etc/virtual/domainowners
chmod 644 /etc/virtual/domains

bisa anda simpan pada file fix_domainowners.sh kemudian jalankan

sh fix_domainowners.sh > /etc/virtual/domainowners

Pages in this namespace:

Layanan

Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |
directadmin/build-missing-domainowners.txt · Last modified: 2022/06/17 23:23 by kbadmin

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki