Update 'scripts/mongodbinstall.sh'

This commit is contained in:
Sophia Atkinson 2022-10-20 11:01:07 -07:00
parent 532163e5ba
commit 5d5c9d616c
1 changed files with 15 additions and 6 deletions

View File

@ -1,13 +1,22 @@
#!/bin/bash
while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do
read -p "Would you like to install MongoDB? (y/n) " go
while true
do
read -r -p "Would you like to install MongoDB? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasnt an option..."
;;
esac
done
if [ "$go" == 'n' ]; then
exit
fi
sudo apt update && apt upgrade -y
sudo apt install wget curl gnupg2 software-properties-common apt-transport-https ca-certificates lsb-release
sudo curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -