diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 00e89fd5..6727a846 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -21,7 +21,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -EXTRA_DIST = nghttpx-init.in +EXTRA_DIST = nghttpx-init.in nghttpx-logrotate edit = sed -e 's|@bindir[@]|$(bindir)|g' diff --git a/contrib/nghttpx-logrotate b/contrib/nghttpx-logrotate new file mode 100644 index 00000000..56b37be6 --- /dev/null +++ b/contrib/nghttpx-logrotate @@ -0,0 +1,18 @@ +/var/log/nghttpx/*.log { + weekly + missingok + rotate 52 + compress + delaycompress + notifempty + create 0640 www-data adm + sharedscripts + prerotate + if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ + run-parts /etc/logrotate.d/httpd-prerotate; \ + fi \ + endscript + postrotate + [ -s /run/nghttpx.pid ] && kill -USR1 `cat /run/nghttpx.pid` + endscript +}