summaryrefslogtreecommitdiff
path: root/package/squid
diff options
context:
space:
mode:
authorAlex Suykov <alex.suykov@gmail.com>2015-05-23 13:07:42 +0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-05 16:07:56 +0200
commitb8aa3d51667b77e3f6be6c178801ee9be0063a12 (patch)
tree6476572741890c1cd2656569bab111db0cccf010 /package/squid
parent2154063a38cffbcf189af3bb7fec2288cdc6fe82 (diff)
squid: systemd support
squid comes with a .service file, but does not install it. [Thomas: use relative path for symlink instead of absolute path.] Signed-off-by: Alex Suykov <alex.suykov@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/squid')
-rw-r--r--package/squid/squid.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index 3d0f4d834..adc09e5b2 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -81,4 +81,12 @@ define SQUID_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S97squid
endef
+define SQUID_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0644 $(@D)/tools/squid.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/squid.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../..//usr/lib/systemd/system/squid.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/squid.service
+endef
+
$(eval $(autotools-package))