No verbose output
This commit is contained in:
@@ -16,8 +16,6 @@ Choices:
|
||||
${RED}2${NC} - No thanks, continue (default)"
|
||||
echo ""
|
||||
echo "Which of the above do you wish to do? Type the choice number and press enter."
|
||||
echo ""
|
||||
echo ""
|
||||
read install
|
||||
|
||||
# OS Selection ===================================================>
|
||||
@@ -29,8 +27,6 @@ if [ "$install" == "1" ]; then
|
||||
echo "${RED}2${NC} - Mac OS High Sierra or above"
|
||||
echo ""
|
||||
echo "Which of the above do you wish to do? Type the choice number and press enter."
|
||||
echo ""
|
||||
echo ""
|
||||
read os
|
||||
|
||||
# Ubuntu OS ===================================================>
|
||||
@@ -39,42 +35,36 @@ if [ "$install" == "1" ]; then
|
||||
sudo dpkg-reconfigure tzdata
|
||||
|
||||
clear
|
||||
echo "Verifying the basics are installed."
|
||||
echo ""
|
||||
sudo apt-get update
|
||||
sudo apt-get install software-properties-common -y
|
||||
sudo add-apt-repository ppa:certbot/certbot -y
|
||||
sudo apt-get update
|
||||
sudo apt-get install certbot screen zip fail2ban unzip git build-essential apt-transport-https ca-certificates curl software-properties-common -y
|
||||
echo "Verifying the basics are installed. Please wait."
|
||||
sudo apt-get update &>/dev/null
|
||||
sudo apt-get install software-properties-common -y &>/dev/null
|
||||
sudo add-apt-repository ppa:certbot/certbot -y &>/dev/null
|
||||
sudo apt-get update &>/dev/null
|
||||
sudo apt-get install certbot screen zip fail2ban unzip git build-essential apt-transport-https ca-certificates curl software-properties-common -y &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Attempting to install Docker now"
|
||||
echo ""
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
|
||||
sudo apt-get update && sudo apt-get install docker-ce docker-compose -y
|
||||
echo "Attempting to install Docker now."
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &>/dev/null
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" &>/dev/null
|
||||
sudo apt-get update &>/dev/null && sudo apt-get install docker-ce docker-compose -y &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Setting Docker to have the correct storage driver and reloading service."
|
||||
echo ""
|
||||
echo '{
|
||||
"storage-driver": "devicemapper"
|
||||
}' | sudo tee /etc/docker/daemon.json && sudo service docker restart
|
||||
}' | sudo tee /etc/docker/daemon.json && sudo service docker restart &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Configuring UFW."
|
||||
echo ""
|
||||
sudo ufw allow 22/tcp && sudo ufw allow 80/tcp && sudo ufw allow 8080/tcp && sudo ufw allow 443/tcp && sudo ufw allow 9000/tcp && sudo ufw allow 53595/tcp && sudo ufw deny 3306/tcp
|
||||
sudo sed -i 's/DEFAULT_FORWARD_POLICY="DENY"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw
|
||||
sudo ufw reload
|
||||
sudo ufw --force enable
|
||||
sudo ufw allow 22/tcp &>/dev/null && sudo ufw allow 80/tcp &>/dev/null && sudo ufw allow 8080/tcp &>/dev/null && sudo ufw allow 443/tcp &>/dev/null && sudo ufw allow 9000/tcp &>/dev/null && sudo ufw allow 53595/tcp &>/dev/null && sudo ufw deny 3306/tcp &>/dev/null
|
||||
sudo sed -i 's/DEFAULT_FORWARD_POLICY="DENY"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw &>/dev/null
|
||||
sudo ufw reload &>/dev/null
|
||||
sudo ufw --force enable &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Installing Oracle Java JDK 8"
|
||||
echo ""
|
||||
sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y
|
||||
echo ""
|
||||
sudo add-apt-repository ppa:webupd8team/java -y && sudo apt update && sudo apt install ant oracle-java8-set-default openjfx -y
|
||||
echo "Installing Oracle Java JDK 8."
|
||||
sudo apt-get remove openjdk-6-jre default-jre default-jre-headless -y &>/dev/null
|
||||
sudo add-apt-repository ppa:webupd8team/java -y &>/dev/null && sudo apt update &>/dev/null && sudo apt install ant oracle-java8-set-default openjfx -y &>/dev/null
|
||||
fi
|
||||
# Ubuntu OS <===================================================
|
||||
|
||||
@@ -87,43 +77,36 @@ if [ "$install" == "1" ]; then
|
||||
echo "${RED}2${NC} - Yes"
|
||||
echo ""
|
||||
echo "Which of the above do you wish to do? Type the choice number and press enter."
|
||||
echo ""
|
||||
echo ""
|
||||
read brew
|
||||
|
||||
# Mac Brew ===================================================>
|
||||
if [ "$brew" == "1" ]; then
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
brew install git
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" &>/dev/null
|
||||
brew install git &>/dev/null
|
||||
fi
|
||||
# Mac Brew <===================================================
|
||||
|
||||
clear
|
||||
echo "Verifying the basics are installed."
|
||||
echo ""
|
||||
brew install unzip wget git curl zip screen
|
||||
brew tap AdoptOpenJDK/openjdk
|
||||
brew install adoptopenjdk-openjdk8 ant openjfx
|
||||
brew install unzip wget git curl zip screen &>/dev/null
|
||||
brew tap AdoptOpenJDK/openjdk &>/dev/null
|
||||
brew install adoptopenjdk-openjdk8 ant openjfx &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Downloading the Docker for Mac installer."
|
||||
echo ""
|
||||
wget https://download.docker.com/mac/stable/Docker.dmg
|
||||
hdiutil attach Docker.dmg
|
||||
wget https://download.docker.com/mac/stable/Docker.dmg &>/dev/null
|
||||
hdiutil attach Docker.dmg &>/dev/null
|
||||
echo ""
|
||||
echo "Please drag Docker as instructed in the popup."
|
||||
echo ""
|
||||
echo "Press enter when finished."
|
||||
echo ""
|
||||
read
|
||||
|
||||
clear
|
||||
open /Applications/Docker.app
|
||||
echo ""
|
||||
echo "Docker is launching. Please follow the directions that it gives you."
|
||||
echo ""
|
||||
echo "Press enter when finished."
|
||||
echo ""
|
||||
read
|
||||
fi
|
||||
# Mac OS <===================================================
|
||||
@@ -133,8 +116,7 @@ if [ "$install" == "1" ]; then
|
||||
|
||||
clear
|
||||
echo "Checking for updates to the Docker-Home repository."
|
||||
echo ""
|
||||
sudo git pull
|
||||
sudo git pull &>/dev/null
|
||||
|
||||
clear
|
||||
echo "${RED}Open RSC Installer:${NC}
|
||||
@@ -147,8 +129,6 @@ Choices:
|
||||
"
|
||||
echo ""
|
||||
echo "Which of the above do you wish to do? Type the choice number and press enter."
|
||||
echo ""
|
||||
echo ""
|
||||
read choice
|
||||
|
||||
# Selection ===================================================>
|
||||
@@ -158,31 +138,25 @@ if [ "$choice" == "1" ]; then
|
||||
echo "You have picked ${GREEN}set up for single player!${NC}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Starting up the Docker containers. If error, do \"sudo make stop\" and rerun script."
|
||||
echo ""
|
||||
sudo make start-single-player
|
||||
echo "Starting up the Docker containers."
|
||||
sudo make start-single-player &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Fetching the Game from the Open RSC git repo."
|
||||
echo ""
|
||||
sudo make clone-game
|
||||
sudo chmod -R 777 Game
|
||||
sudo make clone-game &>/dev/null
|
||||
sudo chmod -R 777 Game &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Creating the client cache in your home folder."
|
||||
echo ""
|
||||
mkdir ~/OpenRSC
|
||||
unzip -o Game/client/cache.zip -d ~/OpenRSC
|
||||
mkdir ~/OpenRSC &>/dev/null
|
||||
unzip -o Game/client/cache.zip -d ~/OpenRSC &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Importing the game databases."
|
||||
echo ""
|
||||
sudo make import-game
|
||||
sudo make import-game &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Ready to launch \"./Linux_Single_Player.sh\" - Press enter when ready."
|
||||
echo ""
|
||||
echo ""
|
||||
read next
|
||||
./Linux_Single_Player.sh
|
||||
# 1. Set up for single player <===================================================
|
||||
@@ -193,23 +167,20 @@ elif [ "$choice" == "2" ]; then
|
||||
echo "You have picked ${GREEN}deployment for a publicly hosted server!${NC}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Starting up the Docker containers. If error, do \"sudo make stop\" and rerun script."
|
||||
echo ""
|
||||
sudo chmod -R 777 .
|
||||
sudo make start
|
||||
echo "Starting up the Docker containers."
|
||||
sudo chmod -R 777 &>/dev/null
|
||||
sudo make start &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Fetching the Website and Game from the Open RSC git repo."
|
||||
echo ""
|
||||
sudo make clone-game
|
||||
sudo make clone-website
|
||||
sudo chmod -R 777 .
|
||||
sudo make clone-game &>/dev/null
|
||||
sudo make clone-website &>/dev/null
|
||||
sudo chmod -R 777 &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Creating the client cache in your home folder."
|
||||
echo ""
|
||||
mkdir ~/OpenRSC
|
||||
unzip -o Game/client/cache.zip -d ~/OpenRSC
|
||||
mkdir ~/OpenRSC &>/dev/null
|
||||
unzip -o Game/client/cache.zip -d ~/OpenRSC &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Next is manual file editing for the website domain and SQL user/pass."
|
||||
@@ -231,19 +202,15 @@ elif [ "$choice" == "2" ]; then
|
||||
|
||||
clear
|
||||
echo "Importing the databases."
|
||||
echo ""
|
||||
sudo make import-game
|
||||
sudo make import-ghost
|
||||
sudo make import-game &>/dev/null
|
||||
sudo make import-ghost &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Restarting Docker containers"
|
||||
echo ""
|
||||
sudo make stop && sudo make start
|
||||
echo "Restarting Ghost container."
|
||||
sudo docker stop ghost && sudo docker start ghost &>/dev/null
|
||||
|
||||
clear
|
||||
echo "Ready to launch \"./Linux_Fetch_Updates_Production.sh\" - Press enter when ready."
|
||||
echo ""
|
||||
echo ""
|
||||
read next
|
||||
./Linux_Fetch_Updates_Production.sh
|
||||
# 2. Deployment for a publicly hosted server <===================================================
|
||||
@@ -252,13 +219,9 @@ elif [ "$choice" == "2" ]; then
|
||||
elif [ "$choice" == "3" ]; then
|
||||
|
||||
echo "You have picked ${GREEN}backup all SQL databases!${NC}"
|
||||
echo ""
|
||||
echo ""
|
||||
sudo make backup
|
||||
echo ""
|
||||
echo ""
|
||||
sudo make backup &>/dev/null
|
||||
clear
|
||||
echo "Done! - Press enter to return back to the menu."
|
||||
echo ""
|
||||
read
|
||||
./Linux_Installer.sh
|
||||
# 3. Backup <===================================================
|
||||
|
||||
Reference in New Issue
Block a user