more bugfixing
This commit is contained in:
parent
02ef6fa014
commit
4431f0db5f
@ -37,11 +37,12 @@ printf "Do you want to set up PlayerSync [Y/n]: \n"
|
|||||||
read ansPlayerSync
|
read ansPlayerSync
|
||||||
|
|
||||||
if [[ "$ansPlayerSync" =~ ("y"|"Y") || -z $ansPlayerSync ]]; then
|
if [[ "$ansPlayerSync" =~ ("y"|"Y") || -z $ansPlayerSync ]]; then
|
||||||
printf "What username you want to use? (leave blank for default) \n"
|
printf "What username you want to use? (leave blank for default):\n"
|
||||||
read user_name
|
read user_name
|
||||||
|
|
||||||
printf "What password you want to use? (leave blank for default)\n"
|
printf "What password you want to use? (leave blank for default):\n"
|
||||||
read password
|
read password
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
@ -50,8 +51,8 @@ sleep 2
|
|||||||
|
|
||||||
printf "\n+ Starting to upgrade base system\n\n"
|
printf "\n+ Starting to upgrade base system\n\n"
|
||||||
|
|
||||||
apt update
|
apt update >>
|
||||||
apt upgrade -y
|
apt upgrade -y >>
|
||||||
apt autoremove --purge -y
|
apt autoremove --purge -y
|
||||||
|
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ mv *neoforge*.jar NeoForge.jar
|
|||||||
|
|
||||||
### Installing server ###
|
### Installing server ###
|
||||||
|
|
||||||
java -Xms512M -Xmx2048M -jar NeoForge.jar --installServer
|
java -Xms512M -Xmx2048M -jar NeoForge.jar --installServer >> /dev/null
|
||||||
|
|
||||||
### RAM configuration ###
|
### RAM configuration ###
|
||||||
|
|
||||||
@ -136,14 +137,14 @@ mkdir /opt/minecraft/config
|
|||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $(echo $line | jq -r '.env.server') == "required" ]]; then
|
if [[ $(echo $line | jq -r '.env.server') == "required" ]]; then
|
||||||
dw_mr=$(echo $line | jq -r '.downloads[0]')
|
dw_mr=$(echo $line | jq -r '.downloads[0]')
|
||||||
wget -O mods/ $dw_mr
|
wget mods/ $dw_mr
|
||||||
fi
|
fi
|
||||||
done < <(jq -c '.files[]' 'data/mr.index.json')
|
done < <(jq -c '.files[]' 'data/mr.index.json')
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $(echo $line | jq -r '.env.server') == "required" ]]; then
|
if [[ $(echo $line | jq -r '.env.server') == "required" ]]; then
|
||||||
dw_cf=$(echo $line | jq -r '.downloads[0]')
|
dw_cf=$(echo $line | jq -r '.downloads[0]')
|
||||||
wget -O mods/ $dw_cf
|
wget mods/ $dw_cf
|
||||||
fi
|
fi
|
||||||
done < <(jq -c '.files[]' 'data/cf.index.json')
|
done < <(jq -c '.files[]' 'data/cf.index.json')
|
||||||
|
|
||||||
@ -173,8 +174,14 @@ if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then
|
|||||||
|
|
||||||
rndr=$((RANDOM % (32765-10000+1)+10000))
|
rndr=$((RANDOM % (32765-10000+1)+10000))
|
||||||
sed -i "s/1234567890/$rndr$rndr/g" config/playersync-common.toml #gens uniqe id
|
sed -i "s/1234567890/$rndr$rndr/g" config/playersync-common.toml #gens uniqe id
|
||||||
|
|
||||||
|
if [[ $password -n ]]; then
|
||||||
sed -i "s/KurevskeHesloMain/$password/g" config/playersync-common.toml
|
sed -i "s/KurevskeHesloMain/$password/g" config/playersync-common.toml
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $user_name -z ]]; then
|
||||||
sed -i "s/mainUser/$user_name/g" config/playersync-common.toml
|
sed -i "s/mainUser/$user_name/g" config/playersync-common.toml
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user