add sub-command: service allow

This commit is contained in:
Chai Feng 2018-10-03 09:10:14 +08:00
parent 9e4c161416
commit b557b56a03
No known key found for this signature in database
GPG Key ID: 2DCD9A24E523FFD2

View File

@ -109,7 +109,7 @@ function ufw-docker--service() {
service_port="${2:-}"
die "ufw-docker--service-${service_action}" "${service_name}" "${service_port}"
"ufw-docker--service-${service_action}" "${service_name}" "${service_port}"
;;
*)
ufw-docker--help
@ -117,6 +117,15 @@ function ufw-docker--service() {
esac
}
ufw_docker_agent=ufw-docker-agent
ufw_docker_agent_image="${ufw_docker_agent_image:-chaifeng/${ufw_docker_agent}:181003}"
function ufw-docker--service-allow() {
service_name="$1"
service_port="$2"
}
function ufw-docker--install() {
if ! grep "^# BEGIN UFW AND DOCKER\$" /etc/ufw/after.rules &>/dev/null; then
err "Back up /etc/ufw/after.rules"