From: Florian Eckert Date: Tue, 4 Aug 2020 08:29:43 +0000 (+0200) Subject: docker-ce: add postinst and prerm script for service start and stop X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cc8d8bcf28ad4b6f2ebfdecd3b7496bad6824f85;p=feed%2Fpackages.git docker-ce: add postinst and prerm script for service start and stop Signed-off-by: Florian Eckert --- diff --git a/utils/docker-ce/Makefile b/utils/docker-ce/Makefile index e3496c4f71..aa9af5c1b6 100644 --- a/utils/docker-ce/Makefile +++ b/utils/docker-ce/Makefile @@ -133,4 +133,22 @@ define Package/docker-ce/install $(1)/etc/sysctl.d/12-br-netfilter-ip.conf endef +define Package/docker-ce/postinst +#!/bin/sh +[ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/dockerd enable + /etc/init.d/dockerd uciadd + /etc/init.d/dockerd start +} +endef + +define Package/docker-ce/prerm +#!/bin/sh +[ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/dockerd disable + /etc/init.d/dockerd stop + /etc/init.d/dockerd ucidel +} +endef + $(eval $(call BuildPackage,docker-ce))