squid: use systemd killmode mixed
authorGrant Slater <git@firefishy.com>
Tue, 3 Dec 2019 22:25:48 +0000 (22:25 +0000)
committerGrant Slater <git@firefishy.com>
Tue, 3 Dec 2019 22:27:13 +0000 (22:27 +0000)
Move closer to upstream systemd config
See: https://github.com/squid-cache/squid/commit/d00e0e6d26acbd4c0c5e7b51f6b2900513282456#diff-d29c313433f1723d0bdd9664221014db

cookbooks/squid/recipes/default.rb

index dae04ddeb4eb7393ebf22ee3d7189cf84cecb990..fcc5f337c6c07cce8816abab687a599ecab4837d 100644 (file)
@@ -92,17 +92,17 @@ systemd_service "squid" do
   after ["network.target", "nss-lookup.target"]
   type "forking"
   limit_nofile 98304
-  exec_start_pre "/usr/sbin/squid -N -z"
-  exec_start "/usr/sbin/squid -Y"
-  exec_reload "/usr/sbin/squid -k reconfigure"
-  exec_stop "/usr/sbin/squid -k shutdown"
+  exec_start_pre "/usr/sbin/squid --foreground -z"
+  exec_start "/usr/sbin/squid -YC"
+  exec_reload "/bin/kill -HUP $MAINPID"
+  pid_file "/var/run/squid.pid"
   private_tmp true
   private_devices true
   protect_system "full"
   protect_home true
   restrict_address_families address_families
-  restart "on-failure"
-  timeout_sec 0
+  restart "always"
+  kill_mode "mixed"
 end
 
 service "squid" do