SERIAL not updated after move_domain.sh?

websafe

Verified User
Joined
Jun 15, 2010
Messages
103
Location
Opole, PL
I tried to move a domain from one user to another (both using separate IP addresses) by running:

Code:
/usr/local/directadmin/scripts/move_domain.sh \
    mydomain.com userold usernew

Everything worked fine, domain was moved, zonefile was probably updated:

Code:
-rw-r--r-- 1 root root 1003 Mar 22 23:28 /var/named/mydomain.com.db

but the SERIAL not?

Code:
2013020701

Maybe someone can verify this.
 
There's no reason to increment the zone serial number if all you've done is moved the domain to a different user; it shouldn't change anything at all in the zone file.

Jeff
 
There's no reason to increment the zone serial number if all you've done is moved the domain to a different user; it shouldn't change anything at all in the zone file.

It should, as with moving domain an IP might change. Two days earlier I did move domain with the script with a change of IP. Though I did not check this moment, and did update DNS zone for the domain in Directadmin DNS manager.
 
@nobaloney But the IP changed - the new user has a different IP, the script updated the old IP to the new IP in the zone-file, but the SERIAL was left untouched. That's why my requests to the moved domain were directed to the old IP. I had to update the zone again to renew the serial and then it worked.
 
I'm sorry I didn't understand you at first. The move should of course change the zone file if necessary, and of course a changed zone file should trigger the rewrite with a new serial number.

So it is a bug after all. I've moved the thread, and hopefully John will notice this and get it fixed.

Jeff
 
Hello,

Check the script to see if this code exists, eg:
Code:
[server]# cd /usr/local/directadmin/scripts
[server]# grep rewrite move_domain.sh | grep named
                [B]echo "action=rewrite&value=named&domain=${DOMAIN}" >> /usr/local/directadmin/data/task.queue[/B]
as this is what should be updating the serial.

Note, it might take a minute to update the serial, but should happen.

If not, check:
http://help.directadmin.com/item.php?id=107

and/or:
/var/log/directadmin/errortaskq.log

John
 
Hello and thank You,

I see now, it was my fault, because I'm still using `DirectAdmin 1.41.1` and `grep rewrite move_domain.sh` returned only:

Code:
# grep rewrite move_domain.sh
        #this is needed to rewrite /usr/local/directadmin/data/users/USERS/httpd.conf
        echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

I'm not sure why I'm using an old version... I guess after a manual update this problem will disappear.

Sorry!
 
Back
Top