Beta #1
82
menu
82
menu
@ -1,54 +1,92 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#banner
|
clear
|
||||||
cat banner.txt;
|
|
||||||
|
|
||||||
#Variaveis
|
#Variaveis
|
||||||
SERVER_URL="https://minecraft.azureedge.net/bin-linux/bedrock-server-1.14.60.5.zip"
|
SERVER_URL="https://minecraft.azureedge.net/bin-linux/bedrock-server-1.14.60.5.zip"
|
||||||
SERVER_UPDATE="$(wget -qO- https://raw.githubusercontent.com/Sirherobrine23/Minecraft-Bedrock-auto-install/master/Update.txt)"
|
SERVER_UPDATE="$(wget -qO- https://raw.githubusercontent.com/Sirherobrine23/Minecraft-Bedrock-auto-install/master/Update.txt)"
|
||||||
PATH_TO_INSTALL="/mnt/d/teste/Minecraft"
|
PATH_TO_INSTALL="/home/Minecraft"
|
||||||
PATH_TO_BACKUP="/mnt/d/teste/Minecraft-Backup"
|
PATH_TO_BACKUP="/home/Minecraft-Backup"
|
||||||
IP_V4=$(hostname -i)
|
IP_V4=$(hostname -i)
|
||||||
IP_V6=$(hostname -I)
|
IP_V6=$(hostname -I)
|
||||||
IP_PUBLICO=$(wget -qO- ifconfig.me)
|
IP_PUBLICO=$(wget -qO- ifconfig.me)
|
||||||
file=mcpe
|
file=mcpe
|
||||||
FILE2=mcpe-start.txt
|
FILE2=mcpe-start.txt
|
||||||
MAPA=$(cat $TMP/level.txt)
|
|
||||||
BACKUP="$(TZ=UTC+3 date +"%d-%m-%Y")"
|
BACKUP="$(TZ=UTC+3 date +"%d-%m-%Y")"
|
||||||
TMP=/mnt/d/teste/tmp
|
TMP=/home/Minecraft/tmp &> ./log.txt;
|
||||||
rm -rf $TMP/level.txt
|
sudo mkdir $TMP &> ./log.txt;
|
||||||
cat "$PATH_TO_INSTALL/mcpe/server.properties" | grep "level-name=" > "$TMP/level.txt" ; sed -i "s|level-name=||g" "$TMP/level.txt";
|
rm -rf $TMP/level.txt &> ./log.txt;
|
||||||
|
cat "$PATH_TO_INSTALL/mcpe/server.properties" | grep "level-name=" > "$TMP/level.txt" ; sed -i "s|level-name=||g" "$TMP/level.txt" &> ./log.txt;
|
||||||
|
MAPA=$(cat $TMP/level.txt)
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"-h") cat help.txt ; echo " "
|
"-h") cat banner.txt ; cat help.txt ; echo " "
|
||||||
;;
|
;;
|
||||||
"--help") cat help.txt ; echo " "
|
"--help") cat banner.txt ; cat help.txt ; echo " "
|
||||||
;;
|
;;
|
||||||
"--install")
|
"--install")
|
||||||
|
#banner
|
||||||
|
cat banner.txt;
|
||||||
# Prerequisite
|
# Prerequisite
|
||||||
echo " ";
|
echo " ";
|
||||||
echo "Instalando os Pré-reuisitos para o debian, ubuntu";
|
echo "Instalando os Pré-reuisitos para o debian, ubuntu";
|
||||||
echo -ne "# (01%)\r";
|
echo -ne "# (01%)\r";
|
||||||
sudo apt install -y wget unzip ;
|
sudo apt install -y wget unzip 2>> log.txt &> ./log.txt;
|
||||||
echo -ne "## (02%)\r";
|
echo -ne "## (02%)\r";
|
||||||
sudo mkdir $PATH_TO_INSTALL ;
|
sudo mkdir $PATH_TO_INSTALL &> ./log.txt;
|
||||||
#Download do arquivos servidor
|
#Download do arquivos servidor
|
||||||
sudo wget $SERVER_URL -O $PATH_TO_INSTALL/mcpe.zip ;
|
sudo wget $SERVER_URL -O $PATH_TO_INSTALL/mcpe.zip &> ./log.txt;
|
||||||
echo -ne "######## (40%)\r";
|
echo -ne "######## (40%)\r";
|
||||||
sudo unzip $PATH_TO_INSTALL/mcpe.zip -d $PATH_TO_INSTALL/mcpe ;
|
sudo unzip -o $PATH_TO_INSTALL/mcpe.zip -d $PATH_TO_INSTALL/mcpe &> ./log.txt;
|
||||||
sudo rm -r $PATH_TO_INSTALL/mcpe.zip;
|
sudo rm -rf $PATH_TO_INSTALL/mcpe.zip;
|
||||||
echo -ne "############# (50%)\r";
|
echo -ne "############# (50%)\r";
|
||||||
#config
|
#config
|
||||||
rm -rf $PATH_TO_INSTALL/mcpe/server.properties
|
rm -rf $PATH_TO_INSTALL/mcpe/server.properties &> ./log.txt;
|
||||||
rm -rf $PATH_TO_INSTALL/mcpe/whitelist.json
|
rm -rf $PATH_TO_INSTALL/mcpe/whitelist.json &> ./log.txt;
|
||||||
cp -r ./server.properties $PATH_TO_INSTALL/mcpe/
|
cp -r ./server.properties $PATH_TO_INSTALL/mcpe/ &> ./log.txt;
|
||||||
cp -r ./whitelist.json $PATH_TO_INSTALL/mcpe/
|
cp -r ./whitelist.json $PATH_TO_INSTALL/mcpe/ &> ./log.txt;
|
||||||
echo -ne "####################### (100%)\r";
|
echo -ne "####################### (100%)\r";
|
||||||
echo -ne "####### completo ###### (100%)\r";
|
echo -ne "####### completo ###### (100%)\r";
|
||||||
|
sudo cat "./log.txt"
|
||||||
;;
|
;;
|
||||||
"--update")
|
"--update")
|
||||||
bash teste.sh
|
#banner
|
||||||
|
cat banner.txt;
|
||||||
|
#Copiando
|
||||||
|
echo -ne " (0%)\r";
|
||||||
|
sudo mkdir $PATH_TO_BACKUP &> ./log.txt;
|
||||||
|
sudo mkdir $PATH_TO_BACKUP/$BACKUP &> ./log.txt;
|
||||||
|
echo -ne "# (1%)\r";
|
||||||
|
sudo cp -r $PATH_TO_INSTALL/mcpe/worlds/* $PATH_TO_BACKUP/$BACKUP &> ./log.txt;
|
||||||
|
sudo cp $PATH_TO_INSTALL/mcpe/server.properties $PATH_TO_BACKUP/$BACKUP &> ./log.txt;
|
||||||
|
sudo cp $PATH_TO_INSTALL/mcpe/whitelist.json $PATH_TO_BACKUP/$BACKUP &> ./log.txt;
|
||||||
|
#Movendo versão antiga para $TMP
|
||||||
|
echo -ne "## (10%)\r";
|
||||||
|
|
||||||
|
sudo mv $PATH_TO_INSTALL $TMP &> ./log.txt;
|
||||||
|
#Baixando
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/mcpe.zip &> ./log.txt;
|
||||||
|
sudo wget $SERVER_UPDATE -O $PATH_TO_INSTALL/mcpe.zip &> ./log.txt;
|
||||||
|
sudo unzip -o $PATH_TO_INSTALL/mcpe.zip -d $PATH_TO_INSTALL/mcpe &> ./log.txt;
|
||||||
|
sudo rm -r $PATH_TO_INSTALL/mcpe.zip &> ./log.txt;
|
||||||
|
echo -ne "########### (50%)\r";
|
||||||
|
#Criando Diretorios
|
||||||
|
sudo mkdir $PATH_TO_INSTALL &> ./log.txt;
|
||||||
|
sudo mkdir $PATH_TO_INSTALL/mcpe &> ./log.txt;
|
||||||
|
|
||||||
|
#Copiando mapa para nova versão
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/worlds &> ./log.txt;
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/server.properties &> ./log.txt;
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/whitelist.json &> ./log.txt;
|
||||||
|
sudo cp -r $PATH_TO_BACKUP/$BACKUP/$MAPA $PATH_TO_INSTALL/mcpe/worlds/ &> ./log.txt;
|
||||||
|
sudo cp $PATH_TO_BACKUP/$BACKUP/server.properties $PATH_TO_INSTALL/mcpe/ &> ./log.txt;
|
||||||
|
sudo cp $PATH_TO_BACKUP/$BACKUP/whitelist.json $PATH_TO_INSTALL/mcpe/ &> ./log.txt;
|
||||||
|
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/mcpe/worlds/server.properties &> ./log.txt;
|
||||||
|
sudo rm -rf $PATH_TO_INSTALL/mcpe/worlds/whitelist.json &> ./log.txt;
|
||||||
|
sudo rm -r $PATH_TO_BACKUP
|
||||||
|
echo -ne "####################### (100%)\r";
|
||||||
|
echo -ne "###### Completo ####### (100%)\r";
|
||||||
|
sudo cat "./log.txt"
|
||||||
;;
|
;;
|
||||||
"--screen")
|
"--screen")
|
||||||
#install
|
#install
|
||||||
|
0
teste.sh
0
teste.sh
47
teste2.sh
47
teste2.sh
@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
#Variaveis
|
|
||||||
|
|
||||||
SERVER_URL="https://minecraft.azureedge.net/bin-linux/bedrock-server-1.14.60.5.zip"
|
|
||||||
SERVER_UPDATE="$(wget -qO- https://raw.githubusercontent.com/Sirherobrine23/Minecraft-Bedrock-auto-install/master/Update.txt)"
|
|
||||||
PATH_TO_INSTALL="/mnt/d/teste/Minecraft"
|
|
||||||
PATH_TO_BACKUP="/mnt/d/teste/Minecraft-Backup"
|
|
||||||
IP_V4=$(hostname -i)
|
|
||||||
IP_V6=$(hostname -I)
|
|
||||||
IP_PUBLICO=$(wget -qO- ifconfig.me)
|
|
||||||
file=mcpe
|
|
||||||
FILE2=mcpe-start.txt
|
|
||||||
MAPA=$(cat $TMP/level.txt)
|
|
||||||
BACKUP="$(TZ=UTC+3 date +"%d-%m-%Y")"
|
|
||||||
TMP=/mnt/d/teste/tmp
|
|
||||||
rm -rf $TMP/*
|
|
||||||
cat "$PATH_TO_INSTALL/mcpe/server.properties" | grep "level-name=" > "$TMP/level.txt" ; sed -i "s|level-name=||g" "$TMP/level.txt";
|
|
||||||
|
|
||||||
#Copiando
|
|
||||||
sudo mkdir $PATH_TO_BACKUP 2>> log.txt;
|
|
||||||
sudo mkdir $PATH_TO_BACKUP/$BACKUP 2>> log.txt;
|
|
||||||
sudo cp -r $PATH_TO_INSTALL/mcpe/worlds/* $PATH_TO_BACKUP/$BACKUP 2>> log.txt;
|
|
||||||
sudo cp $PATH_TO_INSTALL/mcpe/server.properties $PATH_TO_BACKUP/$BACKUP 2>> log.txt;
|
|
||||||
sudo cp $PATH_TO_INSTALL/mcpe/whitelist.json $PATH_TO_BACKUP/$BACKUP 2>> log.txt;
|
|
||||||
|
|
||||||
#Movendo versão antiga para $TMP
|
|
||||||
sudo mv $PATH_TO_INSTALL $TMP 2>> log.txt;
|
|
||||||
|
|
||||||
#Baixando
|
|
||||||
# sudo wget $SERVER_UPDATE -O $PATH_TO_INSTALL/mcpe.zip 2>> log.txt;
|
|
||||||
# sudo unzip $PATH_TO_INSTALL/mcpe.zip -d $PATH_TO_INSTALL/mcpe 2>> log.txt;
|
|
||||||
# sudo rm -r $PATH_TO_INSTALL/mcpe.zip 2>> log.txt;
|
|
||||||
|
|
||||||
#Criando Diretorios
|
|
||||||
sudo mkdir $PATH_TO_INSTALL 2>> log.txt;
|
|
||||||
sudo mkdir $PATH_TO_INSTALL/mcpe 2>> log.txt;
|
|
||||||
|
|
||||||
#Copiando mapa para nova versão
|
|
||||||
sudo rm -rf $PATH_TO_INSTALL/worlds 2>> log.txt;
|
|
||||||
sudo rm -rf $PATH_TO_INSTALL/server.properties 2>> log.txt;
|
|
||||||
sudo rm -rf $PATH_TO_INSTALL/whitelist.json 2>> log.txt;
|
|
||||||
sudo cp -r $PATH_TO_BACKUP/$BACKUP/$MAPA $PATH_TO_INSTALL/mcpe/worlds/ 2>> log.txt;
|
|
||||||
sudo cp $PATH_TO_BACKUP/$BACKUP/server.properties $PATH_TO_INSTALL/mcpe/ 2>> log.txt;
|
|
||||||
sudo cp $PATH_TO_BACKUP/$BACKUP/whitelist.json $PATH_TO_INSTALL/mcpe/ 2>> log.txt;
|
|
||||||
|
|
||||||
sudo rm -rf $PATH_TO_INSTALL/mcpe/worlds/server.properties 2>> log.txt;
|
|
||||||
sudo rm -rf $PATH_TO_INSTALL/mcpe/worlds/whitelist.json 2>> log.txt;
|
|
Loading…
x
Reference in New Issue
Block a user