From 14dee11119104d86652b797b683501b0e112ba60d47dfd530c859c14ac2e0177 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Fri, 28 Mar 2014 18:49:46 +0000 Subject: [PATCH] fix pidfiledir OBS-URL: https://build.opensuse.org/package/show/server:proxy/squid?expand=0&rev=56 --- squid.changes | 7 +++++++ squid.service | 2 +- squid.spec | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/squid.changes b/squid.changes index c763c16..ee18588 100644 --- a/squid.changes +++ b/squid.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 28 18:46:44 UTC 2014 - chris@computersalat.de + +- fix pidfile dir + * systemd -> /run/squid.pid + * SysVinit -> /var/run/squid.pid + ------------------------------------------------------------------- Sun Mar 16 08:54:50 UTC 2014 - boris@steki.net diff --git a/squid.service b/squid.service index c25a94f..3862131 100644 --- a/squid.service +++ b/squid.service @@ -10,7 +10,7 @@ ExecStart=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf ExecReload=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf -k reconfigure ExecStop=/usr/sbin/squid -F -f /etc/squid/squid.conf -k shutdown LimitNOFILE=4096 -PIDFile=/var/run/squid.pid +PIDFile=/run/squid.pid [Install] WantedBy=multi-user.target diff --git a/squid.spec b/squid.spec index 8e23e71..3b5384b 100644 --- a/squid.spec +++ b/squid.spec @@ -92,7 +92,7 @@ BuildRequires: libxml2-devel BuildRequires: pkgconfig(libxml-2.0) %endif -%if 0%{?suse_version} > 1140 +%if 0%{?suse_version} >= 1210 BuildRequires: systemd %{?systemd_requires} %define has_systemd 1 @@ -151,7 +151,11 @@ export LDFLAGS='-Wl,-z,relro,-z,now -pie' --datadir=/usr/share/squid \ --sharedstatedir=/var/squid \ --with-logdir=/var/log/squid \ +%if 0%{?has_systemd} --with-pidfile=/run/squid.pid \ +%else + --with-pidfile=/var/run/squid.pid \ +%endif --with-dl \ --enable-disk-io \ --enable-storeio \