summaryrefslogtreecommitdiff
path: root/recipes-devtools/php/files/init.d.php-rpm.patch
blob: 312f5d7809f04a00a5a43006567fb8fa440deaa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -Naru old/sapi/fpm/init.d.php-fpm.in new/sapi/fpm/init.d.php-fpm.in
--- old/sapi/fpm/init.d.php-fpm.in	2017-08-14 16:30:30.551436717 -0500
+++ new/sapi/fpm/init.d.php-fpm.in	2017-08-14 16:51:21.963399670 -0500
@@ -10,12 +10,13 @@
 # Description:       starts the PHP FastCGI Process Manager daemon
 ### END INIT INFO
 
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-php_fpm_BIN=@sbindir@/php-fpm
-php_fpm_CONF=@sysconfdir@/php-fpm.conf
-php_fpm_PID=@localstatedir@/run/php-fpm.pid
+NAME="php-fpm"
+prefix=/usr
+exec_prefix=/usr
+
+php_fpm_BIN=/usr/sbin/php-fpm
+php_fpm_CONF=/etc/php-fpm.conf
+php_fpm_PID=/var/run/php-fpm.pid
 
 
 php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID"
@@ -52,6 +53,12 @@
 
 case "$1" in
 	start)
+                [[ -f /etc/default/$NAME ]] && . /etc/default/"$NAME"
+		if [[ $ENABLED != "yes" ]]; then
+		  echo "$NAME: disabled in /etc/default"
+		  exit
+		fi
+
 		echo -n "Starting php-fpm "
 
 		$php_fpm_BIN --daemonize $php_opts