commit: bfe8aea1761615f485cb8e51af7ff5ab33032550
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 25 00:29:40 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jul 25 00:39:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=bfe8aea1
Add a --with-piddir configure flag.
Our php-fpm init script defaulted to using /run for its pid file, but
now that is configurable via the --with-piddir flag. Its value
defaults to @LOCALSTATEDIR@ and the variable substitution should work
whether or not --with-piddir is set explicitly.
configure.ac | 7 +++++++
doc/php-fpm.example.init.in.in | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9f8b4eb..ac55443 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,13 @@ AC_ARG_ENABLE(
esac],[apache2=false])
AM_CONDITIONAL([APACHE2], [test x$apache2 = xtrue])
+piddir=${piddir="@LOCALSTATEDIR@"}
+AC_ARG_WITH(piddir, AC_HELP_STRING([--with-piddir=DIR],
+ [where php-fpm PID files are placed [LOCALSTATEDIR]]),
+ if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
+ piddir="$withval"
+ fi)
+AC_SUBST(piddir)
# List of output files.
AC_CONFIG_FILES([Makefile src/php.eselect.in doc/php-fpm.example.init.in])
diff --git a/doc/php-fpm.example.init.in.in b/doc/php-fpm.example.init.in.in
index add56b4..04fb26f 100644
--- a/doc/php-fpm.example.init.in.in
+++ b/doc/php-fpm.example.init.in.in
@@ -23,7 +23,7 @@ fi
PHP_FPM_CONF="@SYSCONFDIR@/php/fpm-${PHP_SLOT}/php-fpm.conf"
command="@LIBDIR@/${PHP_SLOT}/bin/php-fpm"
-pidfile="/run/php-fpm-${PHP_SLOT}.pid"
+pidfile="@piddir@/php-fpm-${PHP_SLOT}.pid"
# Force the daemon into the background and make it use our pid file,
# regardless of what the config file says.