maybe more elegant

This commit is contained in:
CerberusV1
2024-10-16 16:42:43 +02:00
parent 6f5c254f4e
commit a7060598c3

View File

@@ -114,6 +114,7 @@ while true; do
break break
;; ;;
"Set RAM") "Set RAM")
while true; do
clear clear
echo " Allocate RAM " echo " Allocate RAM "
echo "------------------------------------------------------------" echo "------------------------------------------------------------"
@@ -121,30 +122,35 @@ while true; do
select opt in "${presets[@]}"; do select opt in "${presets[@]}"; do
case $opt in case $opt in
"1 GB") "1 GB")
clear
echo "------------------------" echo "------------------------"
echo "Allocated 1GB of RAM" echo "Allocated 1GB of RAM"
echo "-Xms512M" > "${server}/user_jvm_args.txt" echo "-Xms512M" > "${server}/user_jvm_args.txt"
echo "-Xmx1G" >> "${server}/user_jvm_args.txt" echo "-Xmx1G" >> "${server}/user_jvm_args.txt"
;; ;;
"2 GB") "2 GB")
clear
echo "------------------------" echo "------------------------"
echo "Allocated 2GB of RAM" echo "Allocated 2GB of RAM"
echo "-Xms1G" > "${server}/user_jvm_args.txt" echo "-Xms1G" > "${server}/user_jvm_args.txt"
echo "-Xmx2G" >> "${server}/user_jvm_args.txt" echo "-Xmx2G" >> "${server}/user_jvm_args.txt"
;; ;;
"4 GB") "4 GB")
clear
echo "------------------------" echo "------------------------"
echo "Allocated 4GB of RAM" echo "Allocated 4GB of RAM"
echo "-Xms2G" > "${server}/user_jvm_args.txt" echo "-Xms2G" > "${server}/user_jvm_args.txt"
echo "-Xmx4G" >> "${server}/user_jvm_args.txt" echo "-Xmx4G" >> "${server}/user_jvm_args.txt"
;; ;;
"8 GB") "8 GB")
clear
echo "------------------------" echo "------------------------"
echo "Allocated 8GB of RAM" echo "Allocated 8GB of RAM"
echo "-Xms4G" > "${server}/user_jvm_args.txt" echo "-Xms4G" > "${server}/user_jvm_args.txt"
echo "-Xmx8G" >> "${server}/user_jvm_args.txt" echo "-Xmx8G" >> "${server}/user_jvm_args.txt"
;; ;;
"16 GB") "16 GB")
clear
echo "------------------------" echo "------------------------"
echo "Allocated 16GB of RAM" echo "Allocated 16GB of RAM"
echo "-Xms8G" > "${server}/user_jvm_args.txt" echo "-Xms8G" > "${server}/user_jvm_args.txt"
@@ -164,6 +170,7 @@ while true; do
;; ;;
esac esac
done done
done
read -p "Press Enter to return to main menu" read -p "Press Enter to return to main menu"
break break
;; ;;