Skip to content

Commit 2ac9b01

Browse files
Add fix for run with sudo from dburr#3
1 parent d286bf9 commit 2ac9b01

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/ibeacon b/ibeacon
2+
index 5f5da1a..62fa981 100755
3+
--- a/ibeacon
4+
+++ b/ibeacon
5+
@@ -72,7 +72,7 @@ def process_command(c):
6+
7+
# check to see if we are the superuser - returns 1 if yes, 0 if no
8+
def check_for_sudo():
9+
- if 'SUDO_UID' in os.environ.keys():
10+
+ if 'SUDO_UID' in os.environ.keys() or os.geteuid() == 0:
11+
return 1
12+
else:
13+
print "Error: this script requires superuser privileges. Please re-run with `sudo.'"

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0001-fix-run-with-sudo.patch

0 commit comments

Comments
 (0)