summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/root/etc/init.d/dockerman
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-06-22 10:34:27 +0200
committerFlorian Eckert <fe@dev.tdt.de>2020-07-28 14:16:14 +0200
commit1803f7e5253e8d3b7057f2ba11d8164408b7156e (patch)
tree8c18ca144c473efd6fef31ec82cb4b2d00f83f0b /applications/luci-app-dockerman/root/etc/init.d/dockerman
parentc72d67a57fe828f639db6ff6954e058700f6fdc6 (diff)
luci-app-dockerman: remove init.d dockerman
The configuration is now done in the docker-ce package. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-dockerman/root/etc/init.d/dockerman')
-rwxr-xr-xapplications/luci-app-dockerman/root/etc/init.d/dockerman47
1 files changed, 0 insertions, 47 deletions
diff --git a/applications/luci-app-dockerman/root/etc/init.d/dockerman b/applications/luci-app-dockerman/root/etc/init.d/dockerman
deleted file mode 100755
index 601dcf9c7c..0000000000
--- a/applications/luci-app-dockerman/root/etc/init.d/dockerman
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-DOCKERD_CONF="/etc/docker/daemon.json"
-
-init_dockerman_chain(){
- iptables -N DOCKER-MAN >/dev/null 2>&1
- iptables -F DOCKER-MAN >/dev/null 2>&1
- iptables -D DOCKER-USER -j DOCKER-MAN >/dev/null 2>&1
- iptables -I DOCKER-USER -j DOCKER-MAN >/dev/null 2>&1
-}
-
-add_allowed_interface(){
- iptables -A DOCKER-MAN -i $1 -o docker0 -j RETURN
-}
-
-add_allowed_ip(){
- iptables -A DOCKER-MAN -d $1 -o docker0 -j RETURN
-}
-
-handle_allowed_interface(){
- #config_list_foreach "local" allowed_ip add_allowed_ip
- config_list_foreach "local" ac_allowed_interface add_allowed_interface
- iptables -A DOCKER-MAN -m conntrack --ctstate ESTABLISHED,RELATED -o docker0 -j RETURN >/dev/null 2>&1
- iptables -A DOCKER-MAN -m conntrack --ctstate NEW,INVALID -o docker0 -j DROP >/dev/null 2>&1
- iptables -A DOCKER-MAN -j RETURN >/dev/null 2>&1
-}
-
-start(){
- [ ! -x "/etc/init.d/dockerd" ] && return 0
-
- config_load dockerman
- config_get daemon_ea "local" daemon_ea
-
- init_dockerman_chain
- if [ -n "$daemon_ea" ]; then
- handle_allowed_interface
- lua /usr/share/dockerman/dockerd-config.lua "$DOCKERD_CONF" && /etc/init.d/dockerd restart && sleep 5 || {
- # 1 running, 0 stopped
- STATE=$([ -n "$(ps |grep /usr/bin/dockerd | grep -v grep)" ] && echo 1 || echo 0)
- [ "$STATE" == "0" ] && /etc/init.d/dockerd start && sleep 5
- }
- lua /usr/share/dockerman/dockerd-ac.lua
- else
- /etc/init.d/dockerd stop
- fi
-}