From 3d1772bdb86e57b64da43e98e1c5c7aa81b8bb9a Mon Sep 17 00:00:00 2001 From: Pratik <> Date: Tue, 24 Sep 2019 14:42:43 +0530 Subject: [PATCH] Need root access --- ufw.awk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ufw.awk b/ufw.awk index 10ad3cf..da64227 100755 --- a/ufw.awk +++ b/ufw.awk @@ -7,6 +7,12 @@ # Give options to process only a certain number of day's log # Check if mawk is available -> if yes, use that +if [[ "$(id -u)" != "0" ]] +then + echo "Need root access to check /var/log/ufw.log file" + exit 1 +fi + # Since changing language improves performance LC_ALL=C