RAM writeup bug
This commit is contained in:
parent
6719e3ca25
commit
614ae5ee01
19
script.sh
19
script.sh
@ -59,22 +59,22 @@ read minRam
|
|||||||
|
|
||||||
if [[ "$minRam" > "$maxRam" ]]; then
|
if [[ "$minRam" > "$maxRam" ]]; then
|
||||||
pritf "\n You allocated too low max ram or too much min ram. Manual intervention at the end will be needed\n"
|
pritf "\n You allocated too low max ram or too much min ram. Manual intervention at the end will be needed\n"
|
||||||
$xmx=$(echo "-Xmx?G")
|
xmx=$(echo "-Xmx?G")
|
||||||
$maxRam="Error"
|
$maxRam="Error"
|
||||||
elif [[ "$maxRam" =~ ("G"|"M") ]]; then
|
elif [[ "$maxRam" =~ ("G"|"M") ]]; then
|
||||||
printf "\n+ Allocating $maxRam as RAM maximum."
|
printf "\n+ Allocating $maxRam as RAM maximum."
|
||||||
$xmx=$(echo "-Xmx$maxRam")
|
xmx=$(echo "-Xmx$maxRam")
|
||||||
elif [[ -z $maxRam ]]; then
|
elif [[ -z $maxRam ]]; then
|
||||||
$maxRam=4G
|
$maxRam=4G
|
||||||
printf "\n+ Allocating $MaxRam as RAM maximum"
|
printf "\n+ Allocating $MaxRam as RAM maximum"
|
||||||
$xmx=$(echo "-Xmx$maxRam")
|
xmx=$(echo "-Xmx$maxRam")
|
||||||
elif [[ ! "$maxRam" =~ ("G"|"MB") ]]; then
|
elif [[ ! "$maxRam" =~ ("G"|"MB") ]]; then
|
||||||
printf "\n+ Allocating ${maxRam}G as RAM maximum"
|
printf "\n+ Allocating ${maxRam}G as RAM maximum"
|
||||||
$xmx=$(echo "-Xmx${maxRam}G")
|
xmx=$(echo "-Xmx${maxRam}G")
|
||||||
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 \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"
|
||||||
$xmx=$(echo "-Xmx?G")
|
xmx=$(echo "-Xmx?G")
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -83,14 +83,14 @@ if [[ "$minRam" > "$maxRam" ]]; then
|
|||||||
$xms=$(echo "-Xms?G")
|
$xms=$(echo "-Xms?G")
|
||||||
elif [[ "$minRam" =~ ("G"|"M") ]]; then
|
elif [[ "$minRam" =~ ("G"|"M") ]]; then
|
||||||
printf "\n+ Allocating $minRam as RAM minimum."
|
printf "\n+ Allocating $minRam as RAM minimum."
|
||||||
$xms=$(echo "-Xms$minRam")
|
xms=$(echo "-Xms$minRam")
|
||||||
elif [[ -z $minRam ]]; then
|
elif [[ -z $minRam ]]; then
|
||||||
$minRam=1G
|
$minRam=1G
|
||||||
printf "\n+ Allocating $minRam as RAM minimum"
|
printf "\n+ Allocating $minRam as RAM minimum"
|
||||||
$xms=$(echo "-Xms$minRam")
|
xms=$(echo "-Xms$minRam")
|
||||||
elif [[ ! "$minRam" =~ ("G"|"MB") ]]; then
|
elif [[ ! "$minRam" =~ ("G"|"MB") ]]; then
|
||||||
printf "Allocating ${minRam}G as RAM maximum"
|
printf "Allocating ${minRam}G as RAM maximum"
|
||||||
$xms=$(echo "-Xms${minRam}G")
|
xms=$(echo "-Xms${minRam}G")
|
||||||
else
|
else
|
||||||
pritnf "\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"
|
||||||
$minRam="Error"
|
$minRam="Error"
|
||||||
@ -238,3 +238,6 @@ printf "\n+ Done, thanks for your time. It is goode idea to chack if everythink
|
|||||||
printf "\nsystemctl status mc-paper"
|
printf "\nsystemctl status mc-paper"
|
||||||
printf "\nsu minecraft -s /bin/bash"
|
printf "\nsu minecraft -s /bin/bash"
|
||||||
printf "\n+ it is good idea to have some fun with screen before trying to open minecraft conesole 'screen -r' while loged wia minecraft user"
|
printf "\n+ it is good idea to have some fun with screen before trying to open minecraft conesole 'screen -r' while loged wia minecraft user"
|
||||||
|
|
||||||
|
|
||||||
|
### Permision ERROR
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user