summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2015-12-10 16:00:29 -0500
committerMichael Orlitzky <mjo@gentoo.org>2015-12-10 16:00:29 -0500
commit41eea178ac8b07da9795ef3ec4c77595037fdb2c (patch)
treec43fdf5e9e71f09ce1e6c9e20d89410578cf9953
parentAdd curly braces around an interpolated string variable. (diff)
downloadeselect-php-41eea178ac8b07da9795ef3ec4c77595037fdb2c.tar.gz
eselect-php-41eea178ac8b07da9795ef3ec4c77595037fdb2c.tar.bz2
eselect-php-41eea178ac8b07da9795ef3ec4c77595037fdb2c.zip
Add the get_apache2_active_symlink_path() function.
The "active symlink" is used in two places: to determine the active version, and to set it. Factor its magic out into a separate function.
-rw-r--r--src/php.eselect.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in
index 2ea8c3d..d882095 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -158,6 +158,24 @@ get_active_fpm() {
[[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}"
}
+# The path to the active version of the apache2 module, which should
+# be a symlink. This is the path used by our apache configuration to
+# load the PHP module. The path is unversioned (that is, it has no "5"
+# or "7" in it) so that the apache configuration does not need to
+# change after the user eselects a different version.
+#
+# INPUT:
+#
+# None.
+#
+# OUTPUT:
+#
+# The path to our libphp.so symlink, which should (but is not
+# guaranteed to) point to a real apache DSO.
+#
+get_apache2_active_symlink_path() {
+ echo "${EROOT}$(get_active_libdir)/apache2/modules/libphp.so"
+}
# Find the active (selected) version of the apache2 module. Used to
# decorate the output of the `eselect php list apache2` command.