List which domains use PHP1 or PHP2

wattie

Verified User
Joined
May 31, 2008
Messages
1,235
Location
Bulgaria
I am considering a major change on one of the PHP versions and I wish to test the domains that are using it. Is there an easy way to see which domains use PHP1 or PHP2 respectfully?
 
Hello,

List all domains with php2_release set as primary:

Code:
for d in `cat /etc/virtual/domainowners | cut -d\: -f1 | sort`; do grep -q ^php1_select=2 /usr/local/directadmin/data/users/*/domains/$d.conf 2>/dev/null && echo $d; done;

List all domains with php1_release set as primary:

Code:
for d in `cat /etc/virtual/domainowners | cut -d\: -f1 | sort`; do grep -q ^php1_select=2 /usr/local/directadmin/data/users/*/domains/$d.conf 2>/dev/null || echo $d; done;
 
Back
Top