davvve

Member
Mar 31, 2003
11
0
151
Europe
Hi

Anyone knows a way to list all domains that are setup on a Cpanel/WHM server? Is there a backend script that can list the domains through SSH?

/David

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
You can use this command:

# more /etc/localdomains

;)

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
1) Using yor favorite editor (pico, vi ..) create a file "listdom"

2) Copy & Paste this code and save the file:

#! /bin/sh

clear
cut -f "1" -d : /etc/trueuserdomains | sort | more


3) Make the file executable:

chmod +x listdom

4) Run the script

./listdom


;)

cPanel.net Support Ticket Number:
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
That is very useful script! Is there anyway to make it so it will lists domains along with the IP address that is attached to the domain?

cPanel.net Support Ticket Number:
 

NetX

Well-Known Member
Jun 18, 2003
177
0
166
#! /bin/sh

clear
more /etc/domainips

:D

cPanel.net Support Ticket Number:
 

goodmove

Well-Known Member
May 12, 2003
637
1
168
Originally posted by NetX
#! /bin/sh
clear
more /etc/domainips
/etc/domainips seems to only display the first domain that was setup on a shared IP. And it doesn't seem to be updating itself if you rearrange the domains in httpd.conf. :(