diff --git a/scripts/install.sh b/scripts/install.sh index b79e72c4f..6955086e7 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -15,11 +15,6 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" -if [ "$EUID" -ne 0 ] - then echo "Please run as root!" - exit -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "openSUSE" /etc/*-release; then @@ -58,6 +53,11 @@ else OSNAME='unknow' fi +if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then + echo "Please run as root!" + exit +fi + # HTTP_PREFIX="https://" # LOCAL_ADDR=common diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 17ca7274e..b0ce3f915 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -19,11 +19,6 @@ startTime=`date +%s` _os=`uname` echo "use system: ${_os}" -if [ "$EUID" -ne 0 ] - then echo "Please run as root!" - exit -fi - if [ ${_os} == "Darwin" ]; then OSNAME='macos' @@ -62,6 +57,10 @@ else OSNAME='unknow' fi +if [ "$EUID" -ne 0 ] && [ "$OSNAME" != "macos" ];then + echo "Please run as root!" + exit +fi # HTTP_PREFIX="https://" # LOCAL_ADDR=common