Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fpm systemd support for Jessie #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo apt-get install -y \
libjpeg-dev \
libpng-dev \
libpspell-dev \
libsystemd-daemon-dev \
libreadline-dev

sudo mkdir /usr/local/php7
Expand Down Expand Up @@ -64,6 +65,7 @@ CONFIGURE_STRING="--prefix=/usr/local/php7 \
--with-readline \
--with-curl \
--enable-fpm \
--with-fpm-systemd \
--with-fpm-user=www-data \
--with-fpm-group=www-data"

Expand Down
9 changes: 9 additions & 0 deletions conf/php7-fpm-checkconf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e
errors=$(/usr/local/php7/sbin/php-fpm --fpm-config /usr/local/php7/etc/php-fpm.conf -t 2>&1 | grep "\[ERROR\]" || true);
if [ -n "$errors" ]; then
echo "Please fix your configuration file…"
echo $errors
exit 1
fi
exit 0
13 changes: 13 additions & 0 deletions conf/php7-fpm.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=The PHP 7 FastCGI Process Manager
After=network.target

[Service]
Type=notify
PIDFile=/var/run/php7-fpm.pid
ExecStartPre=/usr/local/lib/php7-fpm-checkconf
ExecStart=/usr/local/php7/sbin/php-fpm --fpm-config /usr/local/php7/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target