1 |
mabi 10/12/19 22:45:22 |
2 |
|
3 |
Added: php-fpm-r3.init php-fpm-gentooified-5.3.4.patch |
4 |
Removed: php-fpm-r1.init |
5 |
Log: |
6 |
somehow managed to miss the fpm part of the src_install update: new init/conf files fix bugs #343649, #348507 |
7 |
|
8 |
(Portage version: 2.1.9.24/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 dev-lang/php/files/php-fpm-r3.init |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-r3.init?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-r3.init?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: php-fpm-r3.init |
17 |
=================================================================== |
18 |
#!/sbin/runscript |
19 |
|
20 |
PHPSLOT=${SVCNAME#php-fpm-} |
21 |
|
22 |
if [[ $PHPSLOT == "php-fpm" ]]; then |
23 |
PHPSLOT=$(eselect php show fpm) |
24 |
else |
25 |
PHPSLOT=php${PHPSLOT} |
26 |
fi |
27 |
|
28 |
|
29 |
PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" |
30 |
|
31 |
PHP_FPM_PID="/var/run/php-fpm.pid" |
32 |
|
33 |
opts="depend start stop reload" |
34 |
|
35 |
depend() { |
36 |
need net |
37 |
use apache2 lighttpd nginx |
38 |
} |
39 |
|
40 |
start() { |
41 |
ebegin "Starting PHP FastCGI Process Manager" |
42 |
start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" |
43 |
local i=0 |
44 |
local timeout=5 |
45 |
while [[ ! -f ${PHP_FPM_PID} ]] && [[ $i -le $timeout ]]; do |
46 |
sleep 1 |
47 |
i=$(($i + 1)) |
48 |
done |
49 |
|
50 |
[[ $timeout -gt $i ]] |
51 |
eend $? |
52 |
} |
53 |
|
54 |
stop() { |
55 |
ebegin "Stopping PHP FastCGI Process Manager" |
56 |
start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID} |
57 |
eend $? |
58 |
} |
59 |
|
60 |
reload() { |
61 |
ebegin "Reloading PHP FastCGI Process Manager" |
62 |
[[ -f ${PHP_FPM_PID} ]] && kill -USR2 $(cat ${PHP_FPM_PID}) |
63 |
eend $? |
64 |
} |
65 |
|
66 |
|
67 |
|
68 |
1.1 dev-lang/php/files/php-fpm-gentooified-5.3.4.patch |
69 |
|
70 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-gentooified-5.3.4.patch?rev=1.1&view=markup |
71 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/php-fpm-gentooified-5.3.4.patch?rev=1.1&content-type=text/plain |
72 |
|
73 |
Index: php-fpm-gentooified-5.3.4.patch |
74 |
=================================================================== |
75 |
--- sapi/fpm/php-fpm.conf 2010-12-13 21:48:51.000000000 +0100 |
76 |
+++ sapi/fpm/php-fpm.conf.new 2010-12-13 22:36:39.000000000 +0100 |
77 |
@@ -12,7 +12,7 @@ |
78 |
; Relative path can also be used. They will be prefixed by: |
79 |
; - the global prefix if it's been set (-p arguement) |
80 |
; - /usr/lib64/php5.3 otherwise |
81 |
-;include=etc/fpm.d/*.conf |
82 |
+;include=/etc/fpm-php5.3/fpm.d/*.conf |
83 |
|
84 |
;;;;;;;;;;;;;;;;;; |
85 |
; Global Options ; |
86 |
@@ -22,12 +22,12 @@ |
87 |
; Pid file |
88 |
; Note: the default prefix is /var/lib |
89 |
; Default Value: none |
90 |
-;pid = run/php-fpm.pid |
91 |
+pid = /var/run/php-fpm.pid |
92 |
|
93 |
; Error log file |
94 |
; Note: the default prefix is /var/lib |
95 |
; Default Value: log/php-fpm.log |
96 |
-;error_log = log/php-fpm.log |
97 |
+error_log = /var/log/php-fpm.log |
98 |
|
99 |
; Log level |
100 |
; Possible Values: alert, error, warning, notice, debug |
101 |
@@ -159,12 +159,12 @@ |
102 |
; The desired minimum number of idle server processes. |
103 |
; Note: Used only when pm is set to 'dynamic' |
104 |
; Note: Mandatory when pm is set to 'dynamic' |
105 |
-;pm.min_spare_servers = 5 |
106 |
+pm.min_spare_servers = 5 |
107 |
|
108 |
; The desired maximum number of idle server processes. |
109 |
; Note: Used only when pm is set to 'dynamic' |
110 |
; Note: Mandatory when pm is set to 'dynamic' |
111 |
-;pm.max_spare_servers = 35 |
112 |
+pm.max_spare_servers = 35 |
113 |
|
114 |
; The number of requests each child process should execute before respawning. |
115 |
; This can be useful to work around memory leaks in 3rd party libraries. For |