From 3825cecb40860913dbf15908527b74554d725860 Mon Sep 17 00:00:00 2001 From: jash Date: Sun, 4 Nov 2018 17:38:13 +0100 Subject: [PATCH] simplificationa and bug fix --- dist/setup.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/dist/setup.sh b/dist/setup.sh index 4cdd41b..041f605 100755 --- a/dist/setup.sh +++ b/dist/setup.sh @@ -505,17 +505,6 @@ check_directory_owner() { echo $status } -check_is_sudoer() { - echo " check Cyphernode installer has determined that it needs sudo to continue." - echo " Let's verify that you have sudo rights..." - sudo echo " Yes! You have what it takes to run cyphernode." - - if [[ $? == 1 ]]; then - echo " AARGH! Mein Leben..." - return 1 - fi -} - check_bitcoind() { echo 0 } @@ -543,8 +532,12 @@ sanity_checks() { fi if [[ $sudo == 1 ]]; then - check_is_sudoer - if [[ $?==1 ]]; then + echo " check Cyphernode installer has determined that it needs sudo to continue." + echo " Let's verify that you have sudo rights..." + sudo echo " Yes! You have what it takes to run cyphernode." + + if [[ $? == 1 ]]; then + echo " AARGH! Mein Leben..." echo " To fix this, either ask your administrator to add you to the sudo group" if [[ $sudo_reason == 'user' ]]; then echo " or do not use the 'run as different user' option." @@ -629,6 +622,7 @@ fi if [[ -f installer/config.sh ]]; then . installer/config.sh + RUN_AS_USER="blah" fi sanity_checks