Comment 5 for bug 1230917

Revision history for this message
Ondřej Surý (ondrej) wrote : Re: php5-fpm logrotate errors after package switched to upstart

This should help:

$ git diff HEAD~2
diff --git a/debian/php5-fpm.init b/debian/php5-fpm.init
index b8b2fb3..13485ce 100644
--- a/debian/php5-fpm.init
+++ b/debian/php5-fpm.init
@@ -16,7 +16,7 @@ DESC="PHP5 FastCGI Process Manager"
 NAME=php5-fpm
 DAEMON=/usr/sbin/$NAME
 DAEMON_ARGS="--daemonize --fpm-config /etc/php5/fpm/php-fpm.conf"
-PIDFILE=/var/run/php5-fpm.pid
+PIDFILE=/run/php5-fpm.pid
 TIMEOUT=30
 SCRIPTNAME=/etc/init.d/$NAME

diff --git a/debian/php5-fpm.logrotate b/debian/php5-fpm.logrotate
index 328193e..f794c60 100644
--- a/debian/php5-fpm.logrotate
+++ b/debian/php5-fpm.logrotate
@@ -6,6 +6,6 @@
        compress
        delaycompress
        postrotate
- invoke-rc.d php5-fpm reopen-logs > /dev/null
+ kill -USR1 $(cat /run/php5-fpm.pid) > /dev/null
        endscript
 }