Blob Blame History Raw
From 75955e86c37f69a4421a1fa49102790bb25ea7d1 Mon Sep 17 00:00:00 2001
From: Lasse Karstensen <lkarsten@varnish-software.com>
Date: Mon, 1 Feb 2016 14:05:47 +0100
Subject: [PATCH] Revert removal of type=forking.

In fbc85bb3 the use of type=forking was removed. This made #1794
reappear, as these tools when not daemonized exists when receiving
a SIGHUP.

This is clearly suboptimal for log rotation.

Roll back this in the packages for now.
---
 debian/varnishlog.service  | 4 +++-
 debian/varnishncsa.service | 4 +++-
 redhat/varnishlog.service  | 4 +++-
 redhat/varnishncsa.service | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/varnishlog.service b/debian/varnishlog.service
index 7e54a4e..19e60fa 100644
--- a/debian/varnishlog.service
+++ b/debian/varnishlog.service
@@ -3,9 +3,11 @@ Description=Varnish Cache HTTP accelerator logging daemon
 After=varnish.service
 
 [Service]
+Type=forking
+PIDFile=/run/varnishlog.pid
 User=varnishlog
 Group=varnish
-ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log
+ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog.pid
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
diff --git a/debian/varnishncsa.service b/debian/varnishncsa.service
index e8e1d28..ba22f0f 100644
--- a/debian/varnishncsa.service
+++ b/debian/varnishncsa.service
@@ -3,9 +3,11 @@ Description=Varnish Cache HTTP accelerator log daemon
 After=varnish.service
 
 [Service]
+Type=forking
+PIDFile=/run/varnishncsa.pid
 User=varnishlog
 Group=varnish
-ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log
+ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa.pid
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
diff --git a/redhat/varnishlog.service b/redhat/varnishlog.service
index 7e54a4e..19e60fa 100644
--- a/redhat/varnishlog.service
+++ b/redhat/varnishlog.service
@@ -3,9 +3,11 @@ Description=Varnish Cache HTTP accelerator logging daemon
 After=varnish.service
 
 [Service]
+Type=forking
+PIDFile=/run/varnishlog.pid
 User=varnishlog
 Group=varnish
-ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log
+ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog.pid
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
diff --git a/redhat/varnishncsa.service b/redhat/varnishncsa.service
index e8e1d28..ba22f0f 100644
--- a/redhat/varnishncsa.service
+++ b/redhat/varnishncsa.service
@@ -3,9 +3,11 @@ Description=Varnish Cache HTTP accelerator log daemon
 After=varnish.service
 
 [Service]
+Type=forking
+PIDFile=/run/varnishncsa.pid
 User=varnishlog
 Group=varnish
-ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log
+ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa.pid
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]