浏览代码

Prevent running bootstrap.sh as root

Casper 7 年之前
父节点
当前提交
8dfbaba288
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      bootstrap.sh

+ 6 - 0
bootstrap.sh

@@ -1,5 +1,11 @@
 #!/bin/bash
 # Simple bootstrap script to build and run the daemon
+
+if [ "$EUID" -eq 0 ]
+  then echo "Please don't run bootstrap.sh as root."
+  exit
+fi
+
 set -e
 
 # Echo the rest so it's obvious