summaryrefslogtreecommitdiff
path: root/hack/check_root.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hack/check_root.sh')
-rwxr-xr-xhack/check_root.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/hack/check_root.sh b/hack/check_root.sh
new file mode 100755
index 000000000..203eae9d3
--- /dev/null
+++ b/hack/check_root.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+if ! [ $(id -u) = 0 ]; then
+ echo "Please run as root! '$@' requires root privileges."
+ exit 1
+fi