From aeaa845ef0139cb8ffa4050046a82230c08c25b3 Mon Sep 17 00:00:00 2001 From: ggodot Date: Sat, 3 Jan 2026 14:08:26 +0100 Subject: [PATCH] refresh --- README.md | 30 +++----- mc-install.sh | 191 +++++++++----------------------------------------- 2 files changed, 41 insertions(+), 180 deletions(-) diff --git a/README.md b/README.md index 7856b2e..fbc46be 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ To switch user use: # To DO - [ ] Do not stack mods in this repo - [x] Remaking log coments to make sense +- [ ] Update linnks for download - [ ] Better handeling farwarding secrets -- [ ] Research new modpack +- [x] Research new modpack - [ ] Configuration fo playersync ## Proxmox level up @@ -17,36 +18,23 @@ To switch user use: - 3306 db accept # Changes +- [ ] firewall by prox ## Server side -- [ ] Remove ftb stack -- [x] [Proxy-compatible-forge](https://cdn.modrinth.com/data/vDyrHl8l/versions/K43ePlgq/proxy-compatible-forge-1.20-1.1.4.jar) -- [x] [SkinRestorer](https://modrinth.com/mod/skinrestorer) -- [x] [PlayerSync](https://github.com/mlus-asuka/PlayerSync) -- [ ] [Prometheus permmisions](https://modrinth.com/mod/prometheus) -- [ ] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims) +- [ ] [Proxy-compatible-forge](https://cdn.modrinth.com/data/vDyrHl8l/versions/K43ePlgq/proxy-compatible-forge-1.20-1.1.4.jar) +- [ ] [SkinRestorer](https://modrinth.com/mod/skinrestorer) +- [ ] [PlayerSync](https://github.com/mlus-asuka/PlayerSync) +- [x] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims) - [ ] Disable ~/world/serverconfig/open*.serer.toml chunkProtectClaim = true > false -- [ ] [Argonauts for parties](https://modrinth.com/mod/argonauts) -- [ ] Add Create Essenctials (jatpacky) ## Client side -- [ ] Remove Leakyfi -- [ ] Remove ftb stack -- [ ] Remove ChunkLoaders -- [ ] [Open parties and chunks](https://modrinth.com/mod/open-parties-and-claims) -- [ ] [Argonauts for party](https://modrinth.com/mod/argonauts) -- [ ] Enable create esentials (jatpacky) -- [ ] Prometheus for TeamLeadrs - -### Chunkloaders dilema -- [x] PowerLoaders + OpenParties&Claims - - both - - one > whitch??? +- [ ] Clean it up and make it rain ### World gen dilema - [ ] [Tectonic world gen](https://modrinth.com/datapack/tectonic) - [ ] https://modrinth.com/mod/custom-world-generation/version/2.0.0 +https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar ## Vlacky web / dynmap - [ ] Candy to tailscale serve diff --git a/mc-install.sh b/mc-install.sh index 3f7d745..36f4a58 100755 --- a/mc-install.sh +++ b/mc-install.sh @@ -4,78 +4,6 @@ printf "Better to run as root, because of permisions handeling.\n" sleep 2 -### Deb12 > Deb13 ### - -printf "Do you want to update from Debian 12 into Debian 13? [Y/n]: \n" -read ansDebUpdate - - -### LXC SSH configuration ### - -printf "Are you using LXC and want to set up full SSH server? [Y/n]: \n" -read ansLxcSshServer - -if [[ "$ansLxcSshServer" =~ ("N"|"n") ]]; then - printf "+ Thanks, working on next bit\n" - -elif [[ "$ansLxcSshServer" =~ ("Y"|"y") || -z $ansLxcSshServer ]]; then - printf "+ Setting up full ssh server\n" - - systemctl disable ssh.socket - systemctl enable ssh - - sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config - -else - printf "\nHope you know what you are doing, I am not able to check your answer." -fi - - -### Firewall ### - -printf "Do you want to set up firewall rules by iptables? [Y/n]: \n" -read ansFirewallSetup - - -if [[ "$ansFirewallSetup" =~ ("N"|"n") ]]; then - - printf "+ Thanks, working on next bit\n" - - -elif [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then - - printf "Do you want to block non-LAN ssh connections? [Y/n/castom]: " - read sshBlockRange - - - if [[ $sshBlockRange =~ ("n"|"N") ]]; then - - printf "+ OK, working on next bit\n" - ipList="" - - elif [[ $sshBlockRange =~ ("y"|"Y") || -z $sshBlockRange ]]; then - - #Pipes all informations about ip interfaces - ipList=$(ip -o -4 a show scope global) - - #Founds data in pattern - ipList=$(echo $ipList | grep -Eo "([0-9]*\.){3}[0-9]*/[0-9]*") - - #substitues space for coma - ipList=$(echo $ipList | tr " " ",") - - printf "+ Accepting SSH connections only on these ip's: $ipList\n" - - - else - printf "\nHope you know what you are doing, I am not checking these :]" - - printf "\nSubmit your IP range to acces SSH in format 192.168.1.1/24 - \nYour IP range: " - read ipList - printf "\n+ Allowing SSH on this range: $ipList \n" - fi -fi ### RAM ### @@ -113,22 +41,6 @@ apt update apt upgrade -y apt autoremove --purge -y -if [[ "$ansDebUpdate" =~ ("N"|"n") ]]; then - printf "+ Not upgrading to Debian 13, may cause problems with java versions. Hope you know what you are doing.\n" - -elif [[ "$ansDebUpdate" =~ ("Y"|"y") || -z $ansDebUpdate ]]; then - printf "+ Working on updating Debian 12 Bookworm into Debian 13 Trixie" - - # changes every bookworm int trixie - sed -i 's/bookworm/trixie/g' /etc/apt/sources.list - - apt update - apt full-upgrade -y - -else - printf "\nHope you know what you are doing, I am not able to check your answer." -fi - ### Installing depandencies ### @@ -137,13 +49,9 @@ fi printf "\n+ Installing depandencies \n\n" apt install openjdk-21-jre-headless screen p7zip-full -y -if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then - - apt install iptables -y - -fi ### User and groupe managment ### + printf "\n+ Creating user minecraft and basic file structure" groupadd minecraft @@ -156,13 +64,14 @@ cd /opt/minecraft/ ### Download forge server ### printf "+ Downloading and installing Forge 1.21.1 \n \n" -wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.1.0-installer.jar -mv forge* Forge.jar +wget https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar + +mv *neoforge*. NeoForge.jar ### Installing server ### -java -Xms512M -Xmx2048M -jar Forge.jar --installServer +java -Xms512M -Xmx2048M -jar NeoForge.jar --installServer ### RAM configuration ### @@ -184,9 +93,9 @@ else 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" echo "-Xmx?G # in place of ? put number of RAM you want to set ass maximum" - fi + if [[ "$minRam" > "$maxRam" ]]; then echo "-Xms?G # in place of ? put number of RAM you want to se ass minimum" elif [[ "$minRam" =~ ("G"|"M") ]]; then @@ -224,31 +133,32 @@ cd data 7z x Mods.zip -o/opt/minecraft/mods/ cd /opt/minecraft/ -# adds mode to help comunicate with VeloProxy -if [[ "$ansVeloProxy" =~ ["y"|"Y"] || -z $ansVeloProxy ]]; then - wget https://cdn.modrinth.com/data/vDyrHl8l/versions/jfiEc2mQ/proxy-compatible-forge-1.1.7.jar - mv proxy-compatible-forge*.jar /opt/minecraft/mods/ - - if [[ "$ansModernFarward" =~ ["y"|"Y"] || -z $ansModernFarward ]]; then - mkdir /opt/minecraft/config - mv data/pcf-common.toml /opt/minecraft/config/ #TODO Research this shit - fi -fi - -# adds aditional mods -if [[ "$ansSkinRestorer" =~ ["y"|"Y"] || -z $ansSkinRestorer ]]; then - wget https://mediafilez.forgecdn.net/files/6897/64/skinrestorer-2.4.3%2B1.21-forge.jar - mv skinrestorer*.jar /opt/minecraft/mods/ -fi - -if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then - cd - - # Not using wget because of castom modification to this mod - mv data/playersync-1.21.1.jar /opt/minecraft/mods - cd /opt/minecarft/ - # TODO what abou configuration of this? -fi - +# TODO neoforge now +## adds mode to help comunicate with VeloProxy +#if [[ "$ansVeloProxy" =~ ["y"|"Y"] || -z $ansVeloProxy ]]; then +# wget https://cdn.modrinth.com/data/vDyrHl8l/versions/jfiEc2mQ/proxy-compatible-forge-1.1.7.jar +# mv proxy-compatible-forge*.jar /opt/minecraft/mods/ +# +# if [[ "$ansModernFarward" =~ ["y"|"Y"] || -z $ansModernFarward ]]; then +# mkdir /opt/minecraft/config +# mv data/pcf-common.toml /opt/minecraft/config/ #TODO Research this shit +# fi +#fi +# +## adds aditional mods +#if [[ "$ansSkinRestorer" =~ ["y"|"Y"] || -z $ansSkinRestorer ]]; then +# wget https://mediafilez.forgecdn.net/files/6897/64/skinrestorer-2.4.3%2B1.21-forge.jar +# mv skinrestorer*.jar /opt/minecraft/mods/ +#fi +# +#if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then +# cd - +# # Not using wget because of castom modification to this mod +# mv data/playersync-1.21.1.jar /opt/minecraft/mods +# cd /opt/minecarft/ +# # TODO what abou configuration of this? +#fi +# ### Permisions ### printf "\n+ Permision handeling\n" @@ -260,44 +170,7 @@ mv data/mc-forge.service /etc/systemd/system/ systemctl daemon-reload -### integration of Maxopoly's instructions on firewall ### -if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then - - printf "+ Executing firewall setup" - - iptables -P INPUT ACCEPT #Clears existing rules - - iptables -A INPUT -i lo -j ACCEPT #Allow loopback - - iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #Allow continuing connections - - iptables -A INPUT -p tcp --dport 22 --source $ipList -j ACCEPT #Allow ssh from set network - - iptables -A INPUT -p tcp --dport 25565 -j ACCEPT #Allow MC port - - iptables -L ### Good place to paste a manual check to not lock yourself out - - printf "\n Does it looks right? [Y/n]: " - read ansFirewallOK - - if [[ "$ansFirewallOK" =~ ("Y"|"y") || -z "$ansFirewallOK" ]]; then - - iptables -P INPUT DROP #Disallow everythink else - - iptables -P FORWARD DROP #Block all forwarding - - iptables -P OUTPUT ACCEPT #Allow all outgouing - - apt install iptables-persistent -y - - else - - printf "\nOK it is time for manual configuration" - printf "\nAfter you are done ramamber to run 'apt install iptables-persistent' to save your config. System will automaticly remove your work after restart" - - fi -fi ### Error handeling ### if [[ "$minRam" = "Error" || "$maxRam" = "Error" ]]; then