Compare commits
15 Commits
add_fabric
...
main
Author | SHA1 | Date | |
---|---|---|---|
9984440a38 | |||
c585238c2d | |||
dd93be3a8e | |||
1997882671 | |||
13aaecb315 | |||
78d6bcfd5a | |||
8fb2cf7488 | |||
e31a66529a | |||
f446eadde4 | |||
353b49a76d | |||
3563330d6b | |||
64d2a60f8e | |||
a16e68ca37 | |||
2dd188a630 | |||
cd9c5910b7 |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: jiriks74 # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
@ -36,6 +36,7 @@ function check_updates {
|
|||||||
download_build=$latest_build
|
download_build=$latest_build
|
||||||
update_version=true
|
update_version=true
|
||||||
update_build=true
|
update_build=true
|
||||||
|
return
|
||||||
else
|
else
|
||||||
echo Checking for updates...
|
echo Checking for updates...
|
||||||
fi
|
fi
|
||||||
|
@ -172,11 +172,11 @@ function download_jre {
|
|||||||
rm java.tar.gz
|
rm java.tar.gz
|
||||||
elif [[ $required_java == "16" ]]; then
|
elif [[ $required_java == "16" ]]; then
|
||||||
echo "Downloading Java 16"
|
echo "Downloading Java 16"
|
||||||
curl -L -o java.tar.gz "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jre_$(echo $arch)_linux_hotspot_16.0.2_7.tar.gz"
|
curl -L -o java.tar.gz "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_$(echo $arch)_linux_hotspot_16.0.2_7.tar.gz"
|
||||||
echo "Extracting Java 16"
|
echo "Extracting Java 16"
|
||||||
tar -xzf java.tar.gz
|
tar -xzf java.tar.gz
|
||||||
echo "Moving Java 16 to $(echo $HOME)/.adoptium_java/jre16"
|
echo "Moving Java 16 to $(echo $HOME)/.adoptium_java/jre16"
|
||||||
mv jdk-16.0.2+7-jre "$(echo $HOME)/.adoptium_java/jre16"
|
mv jdk-16.0.2+7 "$(echo $HOME)/.adoptium_java/jre16"
|
||||||
echo "Removing temporary files"
|
echo "Removing temporary files"
|
||||||
rm java.tar.gz
|
rm java.tar.gz
|
||||||
elif [[ $required_java == "17" ]]; then
|
elif [[ $required_java == "17" ]]; then
|
||||||
|
@ -37,6 +37,9 @@ function check_updates {
|
|||||||
download_build=$latest_build
|
download_build=$latest_build
|
||||||
update_version=true
|
update_version=true
|
||||||
update_build=true
|
update_build=true
|
||||||
|
return
|
||||||
|
else
|
||||||
|
echo Checking for updates...
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if $build is empty
|
# Check if $build is empty
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
EXTRA_SCRIPTS_VERSION="v2.0.0"
|
EXTRA_SCRIPTS_VERSION="v2.1.6"
|
||||||
|
@ -8,7 +8,7 @@ branch.
|
|||||||
The project grew out of the scope I envisioned at first, surprisingly quickly LOL,
|
The project grew out of the scope I envisioned at first, surprisingly quickly LOL,
|
||||||
so I moved all my development here.
|
so I moved all my development here.
|
||||||
|
|
||||||
This project aims to support more minecraft servers rather than just paper.
|
This project aims to support more Minecraft servers than just paper.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ This project aims to support more minecraft servers rather than just paper.
|
|||||||
|
|
||||||
- Checks for the correct Java version installed
|
- Checks for the correct Java version installed
|
||||||
- Enables you to download a download a portable Java version from [Adoptium](https://adoptium.net/)
|
- Enables you to download a download a portable Java version from [Adoptium](https://adoptium.net/)
|
||||||
- The script download's it to `~/.adoptium_java` allowing you to use one
|
- The script downloads it to `~/.adoptium_java` allowing you to use one
|
||||||
Java downlaod across multiple server instances
|
Java downlaod across multiple server instances
|
||||||
- It also allows you to use multiple Java versions allowing you to run
|
- It also allows you to use multiple Java versions allowing you to run
|
||||||
multiple Minecraft servers requiring different Java versions
|
multiple Minecraft servers requiring different Java versions
|
||||||
@ -39,11 +39,12 @@ This project aims to support more minecraft servers rather than just paper.
|
|||||||
|
|
||||||
#### Self-update
|
#### Self-update
|
||||||
|
|
||||||
- This script can self-update itself without the need for user doing it manually
|
- This script can self-update itself without the need for user intervention
|
||||||
|
|
||||||
## Currently supported servers
|
## Currently supported servers
|
||||||
|
|
||||||
- [Paper](https://papermc.io/)
|
- [Paper](https://papermc.io/)
|
||||||
|
- [Fabric](https://fabricmc.net/use/server/)
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ you're running something like Ubuntu.*
|
|||||||
> undefined behavior and may cause the script to crash or perform unexpected actions.
|
> undefined behavior and may cause the script to crash or perform unexpected actions.
|
||||||
>
|
>
|
||||||
> I strongly advise against making any modifications to the server's `.jar` file
|
> I strongly advise against making any modifications to the server's `.jar` file
|
||||||
> manually, as it may interfere with the proper functioning of this script.
|
> manually, as it may interfere with the functionality of this script.
|
||||||
|
|
||||||
## Basic setup
|
## Basic setup
|
||||||
|
|
||||||
|
45
msman.sh
45
msman.sh
@ -8,7 +8,7 @@ set -e
|
|||||||
# and acknowledge the original script and author. #
|
# and acknowledge the original script and author. #
|
||||||
#############################################################################################################
|
#############################################################################################################
|
||||||
|
|
||||||
CURRENT_SCRIPT_VERSION="v2.0.0"
|
CURRENT_SCRIPT_VERSION="v2.1.6"
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# You shouldn't need to change anything in this file
|
# You shouldn't need to change anything in this file
|
||||||
@ -107,7 +107,7 @@ function ask_version_differs {
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "The current server version differs from the one you selected."
|
echo "The current server version differs from the one you selected."
|
||||||
echo "The server version is $current_version and the selected version is $select_version."
|
echo "The server version is $current_version and the selected version is $version."
|
||||||
echo "Do you want to update the server version?"
|
echo "Do you want to update the server version?"
|
||||||
echo "This can cause many issues if you don't know what you are doing."
|
echo "This can cause many issues if you don't know what you are doing."
|
||||||
echo
|
echo
|
||||||
@ -132,6 +132,36 @@ function ask_version_differs {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ask if the new server version differs from the old one
|
||||||
|
function ask_server_type_differs {
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "The current server type differs from the one you selected."
|
||||||
|
echo "The server version is $existing_server_type and the selected type is $server_type."
|
||||||
|
echo "Do you want to change the server type?"
|
||||||
|
echo "This can cause many issues if you don't know what you are doing."
|
||||||
|
echo
|
||||||
|
echo "I am not responsible for any data loss caused by changing the server type."
|
||||||
|
echo
|
||||||
|
echo "You have 15 seconds to respond, or the script will exit"
|
||||||
|
read -t 15 -p "Do you want to change the server type? [y/N] " type_differs
|
||||||
|
|
||||||
|
if [ "$type_differs" != "y" ] && [ "$type_differs" != "Y" ]; then
|
||||||
|
echo "Server type not changed."
|
||||||
|
echo "To start the server again with the server type, change the server type in the config to $existing_server_type."
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$type_differs" == "y" ] || [ "$type_differs" == "Y" ]; then
|
||||||
|
read -t 15 -p "Are you sure you want to change the server type? [y/N] " type_differs
|
||||||
|
if [ "$type_differs" != "y" ] && [ "$type_differs" != "Y" ]; then
|
||||||
|
echo "Server type not changed."
|
||||||
|
echo "To start the server again with the server type, change the server type in the config to $existing_server_type."
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Ask if the new server version differs from the old one
|
# Ask if the new server version differs from the old one
|
||||||
function ask_server_differs {
|
function ask_server_differs {
|
||||||
echo
|
echo
|
||||||
@ -222,7 +252,7 @@ function helper_scripts_update {
|
|||||||
rm msman-helper.tar.gz
|
rm msman-helper.tar.gz
|
||||||
rm -rf msman
|
rm -rf msman
|
||||||
echo "Helper scripts updated successfully."
|
echo "Helper scripts updated successfully."
|
||||||
$EXTRA_SCRIPTS_VERSION = $CURRENT_SCRIPT_VERSION
|
EXTRA_SCRIPTS_VERSION=$(echo $CURRENT_SCRIPT_VERSION)
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
@ -446,6 +476,13 @@ function main {
|
|||||||
# Gets the installed server info
|
# Gets the installed server info
|
||||||
get_existing_server
|
get_existing_server
|
||||||
|
|
||||||
|
# Check if the server type differs from the one in the config
|
||||||
|
if [[ $server_file != false ]]; then
|
||||||
|
if [[ $existing_server_type != $server_type ]]; then
|
||||||
|
ask_server_differs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if the version and build are valid
|
# Check if the version and build are valid
|
||||||
check_version_valid
|
check_version_valid
|
||||||
|
|
||||||
@ -461,6 +498,8 @@ function main {
|
|||||||
# Check if this is the first run
|
# Check if this is the first run
|
||||||
first_run
|
first_run
|
||||||
|
|
||||||
|
# Set the java arguments
|
||||||
|
set_java_args
|
||||||
# Launch the server
|
# Launch the server
|
||||||
launch_server
|
launch_server
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user