Mail archive
alpine-devel

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

From: Matt Smith <mcs_at_darkregion.net>
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
_at_@ -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"
_at_@ -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:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu Dec 30 2010 - 15:57:31 UTC