Add colors to statuses

This commit is contained in:
Jérémy Lecour 2022-04-28 16:31:28 +02:00 committed by Jérémy Lecour
parent b25d67bd43
commit 900c789f95
1 changed files with 10 additions and 10 deletions

View File

@ -985,31 +985,31 @@ stop() {
}
status() {
printf "#### iptables --list ###############################\n"
printf "${BLUE}#### iptables --list ###############################${RESET}\n"
${IPT} --list --numeric --verbose --line-numbers
printf "\n### iptables --table nat --list ####################\n"
printf "\n${BLUE}### iptables --table nat --list ####################${RESET}\n"
${IPT} --table nat --list --numeric --verbose --line-numbers
printf "\n#### iptables --table mangle --list ################\n"
printf "\n${BLUE}#### iptables --table mangle --list ################${RESET}\n"
${IPT} --table mangle --list --numeric --verbose --line-numbers
if is_ipv6_enabled; then
printf "\n#### ip6tables --list ##############################\n"
printf "\n${BLUE}#### ip6tables --list ##############################${RESET}\n"
${IPT6} --list --numeric --verbose --line-numbers
printf "\n#### ip6tables --table mangle --list ###############\n"
printf "\n${BLUE}#### ip6tables --table mangle --list ###############${RESET}\n"
${IPT6} --table mangle --list --numeric --verbose --line-numbers
fi
}
status_without_numbers() {
printf "#### iptables --list ###############################\n"
printf "${BLUE}#### iptables --list ###############################${RESET}\n"
${IPT} --list --numeric
printf "\n### iptables --table nat --list ####################\n"
printf "\n${BLUE}### iptables --table nat --list ####################${RESET}\n"
${IPT} --table nat --list --numeric
printf "\n#### iptables --table mangle --list ################\n"
printf "\n${BLUE}#### iptables --table mangle --list ################${RESET}\n"
${IPT} --table mangle --list --numeric
if is_ipv6_enabled; then
printf "\n#### ip6tables --list ##############################\n"
printf "\n${BLUE}#### ip6tables --list ##############################${RESET}\n"
${IPT6} --list --numeric
printf "\n#### ip6tables --table mangle --list ###############\n"
printf "\n${BLUE}#### ip6tables --table mangle --list ###############${RESET}\n"
${IPT6} --table mangle --list --numeric
fi
}