My Acquia Cloud environmenthas the following domains:
- domaindev
- domaindev2
- domaindev3
When I enable acquia purge on the domaindev environment, it gets all the domains of domaindev2 and domaindev3.
The reason for this is in the function acquia_purge.module:_acquia_purge_get_domains_add_acloud():
if (file_exists('/etc/apache2/conf.d')) {
$site_name = _acquia_purge_get_site_name();
$server_name = shell_exec("grep -r 'ServerName' /etc/apache2/conf.d/$site_name*.conf");
Specifically because the files in that folder are listed as follows:
-rw-r--r-- 1 root root 4325 2014-10-07 20:12 domaindev2-124213.conf
-rw-r--r-- 1 root root 4325 2014-09-10 18:10 domaindev3-34534.conf
-rw-r--r-- 1 root root 4291 2014-10-07 20:12 domaindev-4324.conf
Instead this code should be
if (file_exists('/etc/apache2/conf.d')) {
$site_name = _acquia_purge_get_site_name();
$server_name = shell_exec("grep -r 'ServerName' /etc/apache2/conf.d/$site_name-*.conf");
( add a hyphen after $site_name ).
Would love to create a patch if anyone else agrees with me that my approach is correct.
Comments
Comment #1
mcpuddin commentedComment #2
lahoosascoots commentedAlso an issue on 6.x
This missing dash is also causing the apache conf paths to end up in the list of domains.
Comment #3
matthew.lavoie commentedI have rolled a patch for both D6 and D7 versions with the proposed fix from the original bug report.
Comment #4
nielsvm commented@D6 - this version is lagging behind horribly and hasn't gotten much maintenance. I will do a 'worst offenders' maintenance release to it after
7.x-1.2landed safely.Thanks folks!