max ram error, mods in wrong dir

This commit is contained in:
ggodot 2026-01-29 19:41:21 +01:00
parent cdf9b2c0cb
commit b6d039b55a

View File

@ -94,20 +94,19 @@ elif [[ "$maxRam" =~ ("G"|"M") ]]; then
printf "\n+ Allocating $maxRam as RAM maximum." printf "\n+ Allocating $maxRam as RAM maximum."
echo "-Xmx$maxRam" >> /opt/minecraft/user_jvm_args.txt echo "-Xmx$maxRam" >> /opt/minecraft/user_jvm_args.txt
elif [[ -z $maxRam ]]; then elif [[ -z $maxRam ]]; then
printf "\n+ Allocating $MaxRam as RAM maximum" printf "\n+ Allocating $maxRam as RAM maximum"
echo "-Xmx4G" >> /opt/minecraft/user_jvm_args.txt echo "-Xmx1G" >> /opt/minecraft/user_jvm_args.txt
elif [[ ! "$maxRam" =~ ("G"|"MB") ]]; then elif [[ ! "$maxRam" =~ ("G"|"MB") ]]; then
printf "\n+ Allocating ${maxRam}G as RAM maximum" printf "Allocating ${maxRam}G as RAM maximum"
echo "-Xmx${maxRam}G" >> /opt/minecraft/user_jvm_args.txt echo "-Xmx${maxRam}G" >> /opt/minecraft/user_jvm_args.txt
else else
pritnf "\n \n!!! Sorry I have no idea what are you trying to do :/ Manual intervention will be needed at the end \n" pritnf "\n!!! Sorry I have no idea what are you trying to do :/ Manual intervention will be needed at the end \n"
$maxRam="Error" $maxRam="Error"
echo "-Xmx?G # in place of ? put number of RAM you want to set ass maximum" echo "-Xms?G # in place of ? put number of RAM you want to set as maximum"
fi fi
if [[ "$minRam" > "$maxRam" ]]; then if [[ "$minRam" > "$maxRam" ]]; then
echo "-Xms?G # in place of ? put number of RAM you want to se ass minimum" echo "-Xms?G # in place of ? put number of RAM you want to se as minimum"
elif [[ "$minRam" =~ ("G"|"M") ]]; then elif [[ "$minRam" =~ ("G"|"M") ]]; then
printf "\n+ Allocating $minRam as RAM minimum." printf "\n+ Allocating $minRam as RAM minimum."
echo "-Xms$minRam" >> /opt/minecraft/user_jvm_args.txt echo "-Xms$minRam" >> /opt/minecraft/user_jvm_args.txt
@ -135,14 +134,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 mods/ $dw_mr wget /opt/minecraft/mods/ $dw_mr
fi fi
done < <(jq -c '.files[]' "$home/data/mr.index.json") done < <(jq -c '.files[]' "$home/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 mods/ $dw_cf wget /opt/minecraft/mods/ $dw_cf
fi fi
done < <(jq -c '.files[]' "$home/data/cf.index.json") done < <(jq -c '.files[]' "$home/data/cf.index.json")