Subject: [alpine-devel] [PATCH] main/php: enabled some defaults for php-fpm

From: Matt Smith <[email-masked]>
Date: Thu, 30 Dec 2010 15:57:31 -0600

I enabled some defaults for php-fpm so that it will start without configuration.

Let me know what you think.
---
 main/php/APKBUILD |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index 35df492..2cbaf0c 100644
--- a/main/php/APKBUILD
+++ b/main/php/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php
 pkgver=5.3.4
 _suhosinver=5.3.4-0.9.10
-pkgrel=0
+pkgrel=1
 pkgdesc="The PHP language runtime engine"
 url="http://www.php.net/"
 arch="x86 x86_64"
@@ -298,6 +298,12 @@ fpm() {
 	mkdir -p "$subpkgdir"/etc/php
 	mv "$pkgdir"/usr/sbin/php-fpm "$subpkgdir"/usr/bin/php-fpm
 	mv "$pkgdir"/etc/php/php-fpm.conf.default "$subpkgdir"/etc/php/php-fpm.conf
+
+	# enable some defaults
+	sed -ri "s/^;(pm.start_servers)/\1/" "$subpkgdir"/etc/php/php-fpm.conf
+	sed -ri "s/^;(pm.min_spare_servers)/\1/" "$subpkgdir"/etc/php/php-fpm.conf
+	sed -ri "s/^;(pm.max_spare_servers)/\1/" "$subpkgdir"/etc/php/php-fpm.conf
+
 	install -D -m755 "$srcdir"/php-fpm.init "$subpkgdir"/etc/init.d/php-fpm
 }
 
-- 
1.7.3.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---