Ver Fonte

Prevent running bootstrap.sh as root

Casper há 7 anos atrás
pai
commit
8dfbaba288
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      bootstrap.sh

+ 6 - 0
bootstrap.sh

@@ -1,5 +1,11 @@
 #!/bin/bash
 #!/bin/bash
 # Simple bootstrap script to build and run the daemon
 # 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
 set -e
 
 
 # Echo the rest so it's obvious
 # Echo the rest so it's obvious