ZhenYu e3adb6b347
dockerman: add wan mode option (#3486)
* dockerman: add wan mode option

* fix mistake

* impove notice
2020-03-03 11:12:33 +08:00

23 lines
427 B
Bash
Executable File

#!/bin/sh /etc/rc.common
USE_PROCD=1
START=25
start_service() {
local nofile=$(cat /proc/sys/fs/nr_open)
local wanmode=$(uci get dockerman.local.wan_mode)
if [ $wanmode = "true" ] ;then
dockerwan=" "
else
dockerwan="--iptables=false"
fi
procd_open_instance
procd_set_param stderr 1
procd_set_param command /usr/bin/dockerd $dockerwan
procd_set_param limits nofile="${nofile} ${nofile}"
procd_close_instance
}