simplificationa and bug fix

This commit is contained in:
jash
2018-11-04 17:38:13 +01:00
committed by kexkey
parent b2e2dfed42
commit 3825cecb40

20
dist/setup.sh vendored
View File

@@ -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