[Unit]
Description=PHP FPM Service
After=network.target remote-fs.target nss-lookup.target
ConditionPathIsDirectory=/usr/local/php%i
[Service]
Environment=PHP_CONFDIR=/usr/local/php%i
ExecStart=/bin/bash -c 'exec ${PHP_CONFDIR}/sbin/php-fpm --nodaemonize'
ExecReload=/bin/kill -USR2 $MAINPID
Restart=on-abort
[Install]
WantedBy=multi-user.target