~alpine/aports

[alpine-aports] [PATCH 2/2] testing/php7: Change fpm init script to use reopen logs signal, add logrotate script.

Details
Message ID
<1457017971-29627-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1457017971
DKIM signature
missing
Download raw message
Patch: +31 -5
---
 testing/php7/APKBUILD           | 11 ++++++++---
 testing/php7/php7-fpm.initd     | 12 ++++++++++--
 testing/php7/php7-fpm.logrotate | 13 +++++++++++++
 3 files changed, 31 insertions(+), 5 deletions(-)
 create mode 100644 testing/php7/php7-fpm.logrotate

diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index 6aabfca..597d187 100644
--- a/testing/php7/APKBUILD
+++ b/testing/php7/APKBUILD
@@ -80,6 +80,7 @@ subpackages="$subpackages $pkgname-common"

source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
	$pkgname-fpm.initd
	$pkgname-fpm.logrotate
	$pkgname-module.conf
	install-pear.patch
	tidy-buffio.patch
@@ -291,6 +292,7 @@ fpm() {
		"$subpkgdir"/etc/$pkgname/$file
	done
	install -D -m755 "$srcdir"/$pkgname-fpm.initd "$subpkgdir"/etc/init.d/php-fpm7
	install -D -m755 "$srcdir"/$pkgname-fpm.logrotate "$subpkgdir"/etc/logrotate.d/php-fpm7
}

pear() {
@@ -396,21 +398,24 @@ zip()		{ _mv_ext zip; }
zlib()		{ _mv_ext zlib; }

md5sums="0171201350941327399a5c3e678a86e5  php-7.0.4.tar.bz2
36ede43c4d4462f2d58dbb4a01b4c4d0  php7-fpm.initd
a340f27e83ed4482d2fbb98658ef71cb  php7-fpm.initd
25bde13e7894c2930d97fad68d5dd3b3  php7-fpm.logrotate
47be6cd1ed92f21579e15bf2003a709f  php7-module.conf
483bc0a85c50a9a9aedbe14a19ed4526  install-pear.patch
66f0037a029f9eed2b31d2e1d50f1860  tidy-buffio.patch
d872e633c9b33c3c9f629dd2edd2e5c5  includedir.patch
6ba762ab7a105163b8e5b3913deae109  pid_log.patch"
sha256sums="a246c503709c189ba8e1e22ed2cb22abc27da43a997ff1b3318e181baf529dcc  php-7.0.4.tar.bz2
84241f5cb2891b15bac5bb4aa2e7037cd50d611a1e8a228f6a42e4154aaec9e1  php7-fpm.initd
eca59e8b0498c1c93b35f9a5109ae56d0cda9d94822727d689371ccad31b3615  php7-fpm.initd
6e4406f21b69085714cdb9d9a67c08e27a1c737ab353f9813cb2fc268352d2c6  php7-fpm.logrotate
276c823ee666ea73b36d4e97174eeea05713125b61f7f8681e350453c4123143  php7-module.conf
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab  install-pear.patch
5dc8f32e5e2b1cd6317ada5a5adb9b5f0802ed6e0dbe065d7bfcc0f55d47e0d5  tidy-buffio.patch
ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7  includedir.patch
0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec  pid_log.patch"
sha512sums="9d1dc761cdd9103a91299e01117c1790550e3b94e7694dcc2555d83e5abe3d2170acd6226e8501c5f2a77b5c374b1c9f5ea009999d476818c2682a54def86b96  php-7.0.4.tar.bz2
c633b7e122da9cc16cc6c5ed817f1fc0f38bd05b08265fafd31c904edb0cdc7ccb09e323f037e55ce18e9425ee3599166a194657bf6edd5884305c3c235e5ba6  php7-fpm.initd
89076ab8e170a8f886b88bb30aa3e6a6b4463155a18ea53485cc9e3898c81afa3d01fb8403d28a45dc1680f09c645c2d81d8272bc8b9c7ced41e59b0ba226216  php7-fpm.initd
cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691  php7-fpm.logrotate
fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99  php7-module.conf
f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505  install-pear.patch
6894c9cba7752a3406e774d9efc0e058c37433493c1c20101e9563bf247c112157a67e306b06b9517b0422eca521f543d637a6cbd2cea7639e43f13d773b3d2b  tidy-buffio.patch
diff --git a/testing/php7/php7-fpm.initd b/testing/php7/php7-fpm.initd
index c6bd71a..1016c68 100644
--- a/testing/php7/php7-fpm.initd
+++ b/testing/php7/php7-fpm.initd
@@ -7,7 +7,9 @@ command="/usr/sbin/php-fpm7"
command_args="--fpm-config $cfgfile --pid $pidfile"
required_files="$cfgfile"

extra_started_commands="reload"
extra_started_commands="reload reopen"
description_reload="Reload configuration"
description_reopen="Reopen log files"

depend() {
	need net
@@ -21,7 +23,13 @@ start_pre() {
}

reload() {
	ebegin "Reloading $name"
	ebegin "Reloading ${SVCNAME} configuration"
	start-stop-daemon --signal USR2 --pidfile $pidfile
	eend $?
}

reopen() {
	ebegin Reopening ${SVCNAME} log files""
	start-stop-daemon --signal USR1 --pidfile $pidfile
	eend $?
}
diff --git a/testing/php7/php7-fpm.logrotate b/testing/php7/php7-fpm.logrotate
new file mode 100644
index 0000000..10e53e4
--- /dev/null
+++ b/testing/php7/php7-fpm.logrotate
@@ -0,0 +1,13 @@
/var/log/php7/*.log {
	rotate 7
	daily
	missingok
	notifempty
	delaycompress
	compress
	dateext
	sharedscripts
	postrotate
		/etc/init.d/php-fpm7 --ifstarted --quiet reopen
	endscript
}
-- 
2.7.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)