add internal sub-command raw-command

This commit is contained in:
Chai Feng 2018-10-05 14:11:57 +08:00
parent e92bdff8c3
commit b0aa7318da
No known key found for this signature in database
GPG Key ID: 2DCD9A24E523FFD2

View File

@ -209,6 +209,10 @@ function ufw-docker--service-delete() {
"${ufw_docker_agent}" "${ufw_docker_agent}"
} }
function ufw-docker--raw-command() {
ufw "$@"
}
function ufw-docker--install() { function ufw-docker--install() {
if ! grep "^# BEGIN UFW AND DOCKER\$" /etc/ufw/after.rules &>/dev/null; then if ! grep "^# BEGIN UFW AND DOCKER\$" /etc/ufw/after.rules &>/dev/null; then
err "Back up /etc/ufw/after.rules" err "Back up /etc/ufw/after.rules"
@ -318,7 +322,7 @@ case "$UFW_ACTION" in
"ufw-docker--$UFW_ACTION" "$INSTANCE_NAME" "$INSTANCE_PORT" "$PROTO" "ufw-docker--$UFW_ACTION" "$INSTANCE_NAME" "$INSTANCE_PORT" "$PROTO"
;; ;;
service) service|raw-command)
shift || true shift || true
"ufw-docker--$UFW_ACTION" "$@" "ufw-docker--$UFW_ACTION" "$@"
;; ;;