]> git.ipfire.org Git - thirdparty/squid.git/commit - tools/systemd/squid.service
Bug 3826: SMP compatibility with systemd
authorMarcos Mello <marcosfrm@gmail.com>
Tue, 23 Feb 2016 22:27:43 +0000 (11:27 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 23 Feb 2016 22:27:43 +0000 (11:27 +1300)
commitd00e0e6d26acbd4c0c5e7b51f6b2900513282456
treef330a31b0b128282b656b1dcf967499344f40841
parent7f53f09fb9dc2d6ac4f49ceae514ad6488e2600e
Bug 3826: SMP compatibility with systemd

** These changes require capabilities changes specific to Squid-4 and
   require systemd 209+

NOTE: 'squid -z' command does not yet support SMP with systemd.

Differences from the Squid-3 tools/systemd/squid.service:

- After=nss-lookup.target, for people running a local DNS server like BIND.
  Since there is no requirement dependency, it is a NOP when no such
  service is running.

- Type=forking and squid without -N in ExecStart: SMP now works.

- PIDFile=/var/run/squid.pid to tell systemd what pid is the main one. This
  is actually optional with Squid 4, because systemd will consider its first
  child as the main pid. But let's be safe. DEFAULT_PID_FILE could be used
  here with proper autoconf/automake magic...

- ExecReload calls kill rather than 'squid -k reconfigure'. systemd already
  knows the main pid.

- KillMode=mixed. The old KillMode=process sends SIGTERM (and SIGKILL after
  TimeoutStopSec) only to main daemon process. 'mixed' OTOH sends SIGTERM
  only to main process, but SIGKILL to all services' cgroup processes after
  timeout. With 'mixed' systemd ensures if daemon shutdown fails it will
  clean up all the remains. 'mixed' requires systemd >= 209.
tools/systemd/squid.service