File: 0005-Use-RuntimeDirectory-to-create-run-squid.patch

package info (click to toggle)
squid 7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,680 kB
  • sloc: cpp: 184,403; ansic: 15,331; sh: 5,688; makefile: 5,273; perl: 2,560; sql: 326; python: 240; awk: 141; sed: 1
file content (27 lines) | stat: -rw-r--r-- 915 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Sergio Durigan Junior <sergiodj@debian.org>
Date: Mon, 11 May 2020 18:51:39 -0400
Subject: Use RuntimeDirectory to create /run/squid

Instead of installing the /run/squid directory, which goes against
Debian Policy, we instruct systemd to automatically create it for us
when the service is started.
---
 tools/systemd/squid.service | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/systemd/squid.service b/tools/systemd/squid.service
index 4094f0c..b1b0526 100644
--- a/tools/systemd/squid.service
+++ b/tools/systemd/squid.service
@@ -12,7 +12,10 @@ After=network.target network-online.target nss-lookup.target
 
 [Service]
 Type=notify
-PIDFile=/var/run/squid.pid
+PIDFile=/run/squid.pid
+Group=proxy
+RuntimeDirectory=squid
+RuntimeDirectoryMode=0775
 ExecStartPre=/usr/sbin/squid --foreground -z
 ExecStart=/usr/sbin/squid --foreground -sYC
 ExecReload=/bin/kill -HUP $MAINPID