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