diff --git a/bin/install b/bin/install index 3ed6910a..6177ded7 100755 --- a/bin/install +++ b/bin/install @@ -3,6 +3,7 @@ PYTHON_EXE="/usr/bin/env python" FORCE_FRESH_INSTALL="yes" +ALLOW_ROOT_INSTALL="no" NIMBUS_SRC_REL="`dirname $0`/.." NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd` @@ -15,6 +16,16 @@ if [ "X$1" = "X" ]; then exit 1 fi +if [ $ALLOW_ROOT_INSTALL = "no" ] && [ $EUID -eq 0 ]; then + echo "" + echo "It is not recommended to install Nimbus as root." + echo "If you insist, edit this script:" + echo " $0" + echo "and change ALLOW_ROOT_INSTALL to \"yes\"" + echo "" + exit 1 +fi + NIMBUS_HOME=$1 if [ -d $NIMBUS_HOME ] && [ "$(ls -A $NIMBUS_HOME)" ]; then