From: Hussam Al-Tayeb Date: Tue, 16 Dec 2014 12:23:58 +0000 (+1300) Subject: Bug 3826: pt 2: Provide a systemd .service file for Squid X-Git-Tag: merge-candidate-3-v1~438 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=422cb5da97f93f44d1a87165f4a016a3965857f0;p=thirdparty%2Fsquid.git Bug 3826: pt 2: Provide a systemd .service file for Squid 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. --- diff --git a/configure.ac b/configure.ac index 222ba2df7f..bc586c6b99 100644 --- a/configure.ac +++ b/configure.ac @@ -3837,6 +3837,7 @@ AC_CONFIG_FILES([ tools/helper-mux/Makefile tools/purge/Makefile tools/squidclient/Makefile + tools/systemd/Makefile tools/sysvinit/Makefile ]) diff --git a/tools/Makefile.am b/tools/Makefile.am index 91b9f3d3bf..b6ceea947b 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -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 index 0000000000..142cf26ff7 --- /dev/null +++ b/tools/systemd/Makefile.am @@ -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 index 0000000000..0ac323d73f --- /dev/null +++ b/tools/systemd/squid.service @@ -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