From 36e8302e4b19cf412a7c2c9cc8be906a71419884 Mon Sep 17 00:00:00 2001 From: Beeranco <49772805+Beeranco@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:59:59 +0200 Subject: [PATCH] Update monitor.service Added UFW status --- RasPi-Config/monitor.service | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RasPi-Config/monitor.service b/RasPi-Config/monitor.service index 2f07ca3..e56bd89 100644 --- a/RasPi-Config/monitor.service +++ b/RasPi-Config/monitor.service @@ -19,7 +19,7 @@ RESET='\033[0m' IP=`hostname -I` DATE=`date "+%d-%m-%y %H:%M"` KERNEL=`uname -r` - +UFW=`ufw status` ##------------## # Services # @@ -42,6 +42,11 @@ echo "OS status:" echo "My IP is: $IP" echo "CPU usage: $CPUstat" echo "RAM usage: $MEMstat" +if [[ $UFW != *in* ]]; then + echo -e "Firewall: ${GREEN}active${RESET}" + else + echo -e "Firewall: ${RED}inactive${RESET}" +fi echo "Kernel $KERNEL" echo ""