From da98d33c244e35f547bc293b34501939b2d45afc Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 13 Dec 2013 09:27:16 -0500
Subject: [PATCH] Smarter symlink name suggestions. - Resolves VUFIND-943.

---
 install.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/install.php b/install.php
index 756bce8bc02..da3adafe653 100644
--- a/install.php
+++ b/install.php
@@ -134,12 +134,17 @@ function getApacheLocation($overrideDir)
         $httpdConf = ($httpdConf && file_exists($httpdConf))
             ? $httpdConf : 'httpd.conf';
 
+        // Suggest a symlink name based on the local directory, so if running in
+        // multisite mode, we don't use the same symlink for multiple instances:
+        $symlink = basename($overrideDir);
+        $symlink = ($symlink == 'local') ? 'vufind' : ('vufind-' . $symlink);
+
         echo "You can do it in either of two ways:\n\n";
         echo "    a) Add this line to your {$httpdConf} file:\n";
         echo "       Include {$overrideDir}/httpd-vufind.conf\n\n";
         echo "    b) Link the configuration to Apache's conf.d directory like this:";
-        echo "\n       ln -s {$overrideDir}/httpd-vufind.conf {$confD}/vufind\n\n";
-        echo "Option b is preferable if your platform supports it,\n";
+        echo "\n       ln -s {$overrideDir}/httpd-vufind.conf {$confD}/{$symlink}\n";
+        echo "\nOption b is preferable if your platform supports it,\n";
         echo "but option a is more certain to be supported.\n\n";
     }
 }
-- 
GitLab