From b6b76b8187c6aa3e025597fb206afbbe6af0bdd7 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Mon, 7 Oct 2024 15:00:21 -0500 Subject: [PATCH] Added php-fpm systemd service files to enable http2 in Mission Portal Ticket: ENT-11440 Changelog: title --- configure.ac | 1 + misc/Makefile.am | 2 ++ misc/systemd/cf-apache.service.in | 4 ++-- misc/systemd/cf-php-fpm.service.in | 16 ++++++++++++++++ misc/systemd/cfengine3.service.in | 2 ++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 misc/systemd/cf-php-fpm.service.in diff --git a/configure.ac b/configure.ac index 96609095da..cae3eeb000 100644 --- a/configure.ac +++ b/configure.ac @@ -1582,6 +1582,7 @@ AC_ARG_WITH(systemd-service, AS_HELP_STRING([--with-systemd-service=PATH], AS_IF([test "x$SYSTEMD_SERVICE_PATH" = "x"], [], [ AC_SUBST([SYSTEMD_SERVICE_PATH]) AC_CONFIG_FILES([misc/systemd/cfengine3.service]) + AC_CONFIG_FILES([misc/systemd/cf-php-fpm.service]) AC_CONFIG_FILES([misc/systemd/cf-apache.service]) AC_CONFIG_FILES([misc/systemd/cf-execd.service]) AC_CONFIG_FILES([misc/systemd/cf-hub.service]) diff --git a/misc/Makefile.am b/misc/Makefile.am index f2e7e49d10..1d2e83e848 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = selinux # include unconditionally in the distribution tarball EXTRA_DIST= init.d/cfengine3.in \ + systemd/cf-php-fpm.service.in \ systemd/cf-apache.service.in \ systemd/cf-execd.service.in \ systemd/cf-hub.service.in \ @@ -21,6 +22,7 @@ endif if WITH_SYSTEMD_SERVICE systemddir = $(SYSTEMD_SERVICE_PATH) systemd_DATA = systemd/cfengine3.service +systemd_DATA += systemd/cf-php-fpm.service systemd_DATA += systemd/cf-apache.service systemd_DATA += systemd/cf-execd.service systemd_DATA += systemd/cf-hub.service diff --git a/misc/systemd/cf-apache.service.in b/misc/systemd/cf-apache.service.in index e0acc7a75c..07d0eb24bc 100644 --- a/misc/systemd/cf-apache.service.in +++ b/misc/systemd/cf-apache.service.in @@ -1,8 +1,8 @@ [Unit] Description=CFEngine Enterprise Webserver After=syslog.target -Wants=cf-postgres.service -After=cf-postgres.service +Wants=cf-php-fpm.service +After=cf-php-fpm.service ConditionPathExists=@workdir@/httpd/bin/apachectl PartOf=cfengine3.service diff --git a/misc/systemd/cf-php-fpm.service.in b/misc/systemd/cf-php-fpm.service.in new file mode 100644 index 0000000000..bc08260b51 --- /dev/null +++ b/misc/systemd/cf-php-fpm.service.in @@ -0,0 +1,16 @@ +[Unit] +Description=CFEngine Enterprise PHP FastCGI Process Manager +After=syslog.target +Wants=cf-postgres.service +After=cf-postgres.service +ConditionPathExists=@workdir@/httpd/php/sbin/php-fpm +PartOf=cfengine3.service + +[Service] +ExecStart=@workdir@/httpd/php/sbin/php-fpm --nodaemonize --force-stderr +ExecReload=/bin/kill -USR2 $MAINPID +PIDFile=@workdir@/httpd/php-fpm.pid +Type=simple + +[Install] +WantedBy=multi-user.target diff --git a/misc/systemd/cfengine3.service.in b/misc/systemd/cfengine3.service.in index 0e75842a7b..c1481265e9 100644 --- a/misc/systemd/cfengine3.service.in +++ b/misc/systemd/cfengine3.service.in @@ -9,6 +9,7 @@ Wants=cf-serverd.service Wants=cf-execd.service Wants=cf-monitord.service Wants=cf-postgres.service +Wants=cf-php-fpm.service Wants=cf-apache.service Wants=cf-hub.service Wants=cf-reactor.service @@ -18,6 +19,7 @@ Before=cf-serverd.service Before=cf-execd.service Before=cf-monitord.service Before=cf-postgres.service +Before=cf-php-fpm.service Before=cf-apache.service Before=cf-hub.service Before=cf-reactor.service