docker-ce: add postinst and prerm script for service start and stop
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 4 Aug 2020 08:29:43 +0000 (10:29 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 11 Aug 2020 07:25:34 +0000 (09:25 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
utils/docker-ce/Makefile

index e3496c4f719eadbad7ff20d255344cf58fd065e4..aa9af5c1b663de54cc4ad9a624f424af7a9d46be 100644 (file)
@@ -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))