Explorar o código

Prevent running bootstrap.sh as root

Casper %!s(int64=7) %!d(string=hai) anos
pai
achega
8dfbaba288
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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