From b0aa7318da1afca1b43d4db736404f33b2eae4a7 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Fri, 5 Oct 2018 14:11:57 +0800 Subject: [PATCH] add internal sub-command `raw-command` --- ufw-docker | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ufw-docker b/ufw-docker index f811ed9..7a4c2ea 100755 --- a/ufw-docker +++ b/ufw-docker @@ -209,6 +209,10 @@ function ufw-docker--service-delete() { "${ufw_docker_agent}" } +function ufw-docker--raw-command() { + ufw "$@" +} + function ufw-docker--install() { if ! grep "^# BEGIN UFW AND DOCKER\$" /etc/ufw/after.rules &>/dev/null; then err "Back up /etc/ufw/after.rules" @@ -318,7 +322,7 @@ case "$UFW_ACTION" in "ufw-docker--$UFW_ACTION" "$INSTANCE_NAME" "$INSTANCE_PORT" "$PROTO" ;; - service) + service|raw-command) shift || true "ufw-docker--$UFW_ACTION" "$@" ;;