diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2020-01-22 10:05:57 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2020-01-22 12:15:08 -0500 |
commit | 355d4102019daaafd9f803bf4435af127e315988 (patch) | |
tree | 14d845eef4d5e0555fd059048b8db9307375e8e0 /src | |
parent | configure.ac: use "ustar" format for the release tarballs. (diff) | |
download | eselect-php-355d4102019daaafd9f803bf4435af127e315988.tar.gz eselect-php-355d4102019daaafd9f803bf4435af127e315988.tar.bz2 eselect-php-355d4102019daaafd9f803bf4435af127e315988.zip |
src/php-fpm-launcher.in: add php-fpm-launcher wrapper script.
While OpenRC services are powerful enough to compute the selected
version of php-fpm, the corresponding systemd services are not and
must use a fixed path. The executable at that fixed path must
therefore decide which version of php-fpm to run before running it.
This commit adds a script to do just that.
This script is already present in the app-eselect/eselect-php
package, tacked on from $FILESDIR. It's a better fit as part of
the repository.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/php-fpm-launcher.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/php-fpm-launcher.in b/src/php-fpm-launcher.in new file mode 100644 index 0000000..940cec9 --- /dev/null +++ b/src/php-fpm-launcher.in @@ -0,0 +1,11 @@ +#!/bin/sh + +# If there are no arguments, then "shift" will fail (bug 626496). +if [ $# -eq 0 ]; then + PHP_SLOT=$(eselect php show fpm) +else + PHP_SLOT=$1 + shift +fi + +exec "@LIBDIR@/${PHP_SLOT}/bin/php-fpm" "${@}" |