ipswap/hostname scripts

MtK

Verified User
Joined
Aug 2, 2007
Messages
405
Hey,
  • when using the ipswap script these IP is not changed in: /etc/httpd/conf/ips_cust.conf
  • when using the hostname script these hostname is not changed in: /usr/local/directadmin/conf/directadmin.conf
 
Hello,

1) I couldn't find any trace of "ips_cust.conf" in any DA file.. thus DA won't be touching it, as it doesn't appear to be a DA file (let me know if I'm missing something).

2) The hostname.sh is called when the hostname is changed via:
Admin Level -> Admin Settings -> hostname

so change the hostname through DA, as it calls the script, and sets the directadmin.conf.
The hostname.sh doesn't touch the directadmin.conf.

John
 
Way back when I wrote it, that's just how I designed it.
Reason was, to keep it separate for more control (although I've never seen a case where it needs to be separate).
Current guide to change hostname:
http://help.directadmin.com/item.php?id=405

John
I just did another hostname change, this time I started from within DA (Admin Level -> Admin Settings -> Server's Hostname).
after I rebooted and SSHed into the server I still see the old server's hostname, and I got an email saying:
[oldserver's hostname]'s DA is down...

but after I ran /usr/local/directadmin/scripts/hostname.sh and rebooted everything is fine :)
 
Last edited:
Hello,

Two issues there.

1) If you see the old hostname again, the system would have it set somewhere else where DA isn't saving it.
For Debian boxes, it's saved to /etc/hostname
FreeBSD: /etc/rc.conf
Others, it's saved to /etc/sysconfig/network

It's possible it's being saved somewhere else, and ignoring the above files (also check the file to ensure it's actually set)

2) If DA isn't running, or you cannot connect to 2222, see this guide:
http://help.directadmin.com/item.php?id=75

John
 
DA is working, that's not my point.
I'm trying to show that either the script don't fully do what it should, or the "hostname change" from within DA doesn't (as you suggested).
 
Back
Top