docker-ce: add reload handling 12849/head
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 17 Jul 2020 12:33:56 +0000 (14:33 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 21 Jul 2020 08:04:39 +0000 (10:04 +0200)
If the uci configuration is changed send dockerd a SIGHUP to reload the
generated daemon.json file with the new configuration.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
utils/docker-ce/Makefile
utils/docker-ce/files/dockerd.init

index 7ec7ce602167fc5669bf91723c1c74aedb47f323..1d5e0a5d9b9f8d928bc646ee32c3db68cef5a3d5 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=docker-ce
 PKG_VERSION:=19.03.12
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
 
index a61dc89e872db91863f56613484e23ddd0933f81..40e7b76b919e397ebf703cd090706a157579675d 100644 (file)
@@ -59,6 +59,15 @@ start_service() {
        procd_close_instance
 }
 
+reload_service() {
+       process_config
+       procd_send_signal dockerd
+}
+
+service_triggers() {
+       procd_add_reload_trigger 'dockerd'
+}
+
 ip4tables_remove_nat() {
        iptables -t nat -D OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
        iptables -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER