Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Added basic root check to install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
labisso committed Jun 14, 2010
1 parent 8666d19 commit 8cb5a4f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/install
Expand Up @@ -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`
Expand All @@ -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
Expand Down

0 comments on commit 8cb5a4f

Please sign in to comment.