Script to change IP address of all the accounts


The following script will do the needful:
for i in `cat /etc/trueuserdomains | cut -d: -f1`
do
/usr/local/cpanel/bin/swapip OLDIP NEWIP $i;
done

OLDIP is the current IP assigned to the domain.
NEWIP is the new IP which you would like to assign.
$i is the domain names read per line from the /etc/trueuserdomains file.

Script to change IP address of all the accounts
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fork me on GitHub