squid: must be started in foreground mode for systemd

This commit is contained in:
Jérémy Lecour 2021-07-02 23:45:42 +02:00 committed by Jérémy Lecour
parent b5bcd666c6
commit 5905751a82
4 changed files with 11 additions and 6 deletions

View File

@ -37,6 +37,7 @@ The **patch** part changes incrementally at each release.
* ntpd: Add leapfile configuration setting to ntpd on debian 10+
* packweb-apache: install phpMyAdmin from buster-backports
* spamassassin: change dependency on evomaintenance
* squid: must be started in foreground mode for systemd
* squid: remove obsolete variable on Squid 4
### Fixed

View File

@ -1,4 +0,0 @@
# systemd override for Squid
[Service]
ExecStart=
ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf

View File

@ -16,8 +16,8 @@
mode: "0755"
- name: "Squid systemd unit service is present"
copy:
src: systemd-override.conf
template:
src: systemd-override.conf.j2
dest: /etc/systemd/system/squid.service.d/override.conf
force: yes
register: _squid_systemd_override

View File

@ -0,0 +1,8 @@
# systemd override for Squid
[Service]
ExecStart=
{% if ansible_distribution_major_version is version('11', '>=') %}
ExecStart=/usr/sbin/squid --foreground -sYC -f /etc/squid/evolinux-defaults.conf
{% else %}
ExecStart=/usr/sbin/squid -sYC -f /etc/squid/evolinux-defaults.conf
{% endif %}