From 162ef756b4f2c1e8aa27999ada0109dfc72b19db Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Tue, 16 Jul 2019 16:31:00 +0200 Subject: Added root perms check --- trackless | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trackless b/trackless index cd1fd8b..034311e 100644 --- a/trackless +++ b/trackless @@ -1,5 +1,10 @@ #!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "This script needs to be run as root." + exit 1 +fi + IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do if [ $IFACE != "lo" ]; then -- cgit 1.4.1