From 0974f9f592f2c2bc3ac24407125e97707ed7182f Mon Sep 17 00:00:00 2001 From: mkono87 <35116314+mkono87@users.noreply.github.com> Date: Tue, 30 Nov 2021 22:15:00 -0500 Subject: [PATCH] more errors fixed :/ --- Cloud_Setup/setup.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Cloud_Setup/setup.sh b/Cloud_Setup/setup.sh index 469330c..9ad671b 100644 --- a/Cloud_Setup/setup.sh +++ b/Cloud_Setup/setup.sh @@ -28,12 +28,12 @@ Sleep 1 function createuser { echo "Creating User" sleep 1 -while [$userprompt == "yes" or "y"]; do +while [$userprompt == "y"]; do read -p "Please enter user name: " user useradd $user usermod -aG sudo $user usermod -aG docker $user -read -p "Do you want to add another user? " userprompt +read -p "Do you want to add another user? [y/n] " userprompt done } @@ -42,17 +42,15 @@ done update -$dockerprompt = read -p ("Do you want to install Docker?) " -if [$dockerprompt == "yes" or "y"]; then - installdocker -else +read -p "Do you want to install Docker? [y/n] " dockerprompt +if [$dockerprompt == "y"]; then + installdocker() fi -read -p "Would you like to add a user? " userprompt -if [$userprompt == "yes" or "y"] ; then - createuser -else +read -p "Would you like to add a user? [y/n] " userprompt +if [$userprompt == "y"]; then + createuser() fi # echo <