]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3826: pt 2: Provide a systemd .service file for Squid
authorHussam Al-Tayeb <hussam@visp.net.lb>
Tue, 16 Dec 2014 12:23:58 +0000 (01:23 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 16 Dec 2014 12:23:58 +0000 (01:23 +1300)
Created with help from davidstrauss in #systemd channel and provided
as a working example for package distributors to use. It is not
installed by a 'make install' build of Squid.

For now SMP support is not available to Squid controlled by systemd.
That part of the bug 3826 issue has yet to be resolved.

configure.ac
tools/Makefile.am
tools/systemd/Makefile.am [new file with mode: 0644]
tools/systemd/squid.service [new file with mode: 0644]

index 222ba2df7ffa0099e2dae7b472a3755e83d7519c..bc586c6b9977d3363b7d7734680a8af4c86b4615 100644 (file)
@@ -3837,6 +3837,7 @@ AC_CONFIG_FILES([
        tools/helper-mux/Makefile
        tools/purge/Makefile
        tools/squidclient/Makefile
+       tools/systemd/Makefile
        tools/sysvinit/Makefile
 ])
 
index 91b9f3d3bfca47e30fc29e77132e95b131da3c15..b6ceea947b64d7ce11ab4cfb8166ad32a5349d9d 100644 (file)
@@ -12,7 +12,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 ## we need our local files too (but avoid -I. at all costs)
 AM_CPPFLAGS += -I$(srcdir)
 
-SUBDIRS = helper-mux purge squidclient sysvinit
+SUBDIRS = helper-mux purge squidclient systemd sysvinit
 EXTRA_DIST = 
 man_MANS = 
 DISTCLEANFILES = 
diff --git a/tools/systemd/Makefile.am b/tools/systemd/Makefile.am
new file mode 100644 (file)
index 0000000..142cf26
--- /dev/null
@@ -0,0 +1,10 @@
+## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+EXTRA_DIST = squid.service
diff --git a/tools/systemd/squid.service b/tools/systemd/squid.service
new file mode 100644 (file)
index 0000000..0ac323d
--- /dev/null
@@ -0,0 +1,19 @@
+## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+[Unit]
+Description=Squid Web Proxy Server
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/squid -sYC -N
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target