$ git diff
diff --git a/ibeacon b/ibeacon
index 5f5da1a..5cf7a05 100755
--- a/ibeacon
+++ b/ibeacon
@@ -74,6 +74,9 @@ def process_command(c):
def check_for_sudo():
if 'SUDO_UID' in os.environ.keys():
return 1
+ if 'USER' in os.environ.keys():
+ if os.environ['USER'] == 'root':
+ return 1
else:
print "Error: this script requires superuser privileges. Please re-run with `sudo.'"
return 0