Switch from --option to option and fix typos

This commit is contained in:
pc
2020-02-02 00:28:02 +00:00
parent fe16a25cee
commit d8914f9892
4 changed files with 29 additions and 29 deletions

View File

@@ -29,7 +29,7 @@
. /usr/local/etc/bastille/bastille.conf
usage() {
echo -e "${COLOR_RED}Usage: bastille rdr TARGET [--clear] | [--list] | [--tcp <host_port> <jail_port>] | [--udp <host_port> <jail_port>]${COLOR_RESET}"
echo -e "${COLOR_RED}Usage: bastille rdr TARGET [clear] | [list] | [tcp <host_port> <jail_port>] | [udp <host_port> <jail_port>]${COLOR_RESET}"
exit 1
}
@@ -82,15 +82,15 @@ fi
while [ $# -gt 0 ]; do
case "$1" in
--list)
list)
pfctl -a "rdr/${JAIL_NAME}" -Psn 2>/dev/null
shift
;;
--clear)
clear)
pfctl -a "rdr/${JAIL_NAME}" -Fn
shift
;;
--tcp)
tcp)
if [ $# -lt 3 ]; then
usage
fi
@@ -99,7 +99,7 @@ while [ $# -gt 0 ]; do
| pfctl -a "rdr/${JAIL_NAME}" -f-
shift 3
;;
--udp)
udp)
if [ $# -lt 3 ]; then
usage
fi