mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix
This commit is contained in:
parent
6b7f0b4dba
commit
fd8b7384d5
104 changed files with 13356 additions and 31 deletions
36
luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman
Normal file
36
luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions.sh
|
||||
|
||||
[ -x "$(command -v dockerd)" ] && chmod +x /etc/init.d/dockerman && /etc/init.d/dockerman enable >/dev/null 2>&1
|
||||
sed -i 's/self:cfgvalue(section) or {}/self:cfgvalue(section) or self.default or {}/' /usr/lib/lua/luci/view/cbi/dynlist.htm
|
||||
/etc/init.d/uhttpd restart >/dev/null 2>&1
|
||||
rm -fr /tmp/luci-indexcache /tmp/luci-modulecache >/dev/null 2>&1
|
||||
touch /etc/config/dockerd
|
||||
ls /etc/rc.d/*dockerd &> /dev/null && uci -q set dockerd.globals.auto_start="1" || uci -q set dockerd.globals.auto_start="0"
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set uhttpd.main.script_timeout="3600"
|
||||
commit uhttpd
|
||||
set dockerd.dockerman=dockerman
|
||||
set dockerd.dockerman.socket_path='/var/run/docker.sock'
|
||||
set dockerd.dockerman.status_path='/tmp/.docker_action_status'
|
||||
set dockerd.dockerman.debug='false'
|
||||
set dockerd.dockerman.debug_path='/tmp/.docker_debug'
|
||||
set dockerd.dockerman.remote_endpoint='0'
|
||||
|
||||
del_list dockerd.dockerman.ac_allowed_interface='br-lan'
|
||||
add_list dockerd.dockerman.ac_allowed_interface='br-lan'
|
||||
|
||||
commit dockerd
|
||||
EOF
|
||||
# remove dockerd firewall
|
||||
config_load dockerd
|
||||
remove_firewall(){
|
||||
cfg=${1}
|
||||
uci_remove dockerd ${1}
|
||||
}
|
||||
config_foreach remove_firewall firewall
|
||||
# Convert ac_allowed_container to ac_allowed_ports
|
||||
(sleep 30s && /etc/init.d/dockerman convert;/etc/init.d/dockerman restart) &
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue