Skip to content

must run with sudo? running as root should also work #5

@apgodshall

Description

@apgodshall

Please apply this:

$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions