summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--trackless5
1 files changed, 5 insertions, 0 deletions
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