wattie Verified User Joined May 31, 2008 Messages 1,206 Location Bulgaria Jul 11, 2017 #1 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?
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?
zEitEr Super Moderator Joined Apr 11, 2005 Messages 15,396 Location www.poralix.com Jul 11, 2017 #2 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;
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;
wattie Verified User Joined May 31, 2008 Messages 1,206 Location Bulgaria Jul 11, 2017 #3 Bash. Awesome, thanks!