LunaPixelStudios / Medieval-MC

https://lunapixel.studio/discord
https://lunapixel.studio/discord
15 stars 9 forks source link

Ubuntu Server / Using Java 18 / "sh start.sh" isn't working #707

Closed 1sun12 closed 10 months ago

1sun12 commented 10 months ago

Describe the Bug

The sh file in the most recent serverpack.zip file doesn't appear to work for "Medieval MC [FORGE] - MMC3".

I retrieved it off curse forge. Which is where I also downloaded the modpack.

The "source not found" appears to be talking about the "variables.txt" file. As if it can't locate it despite it being present in the same folder.

Unsure if this is a super easy to fix problem on my end but just in case it's something larger I wanted to make a bug report.

If it is super easy to fix, the README is unclear then on first time setup and I recommend adding more instructions to it.

Reproduction Steps

  1. Download server.zip
  2. Unzipped onto linux server / Ubuntu server
  3. tries to run "sh start.sh"
  4. doesn't work
  5. read the README, doesn't appear to have instructions other than that. ...

Screenshots and Videos

issue

Crash Report or Log

No response

Operating System

Ubuntu 20.04.6 LTS x86_64

Minecraft Version

1.19

Modloader

Forge

Modpack Version

1.19.2 v18

Optifine

No

Other Mods

Not applicable

muon-rw commented 10 months ago

Edit the “variables.txt” in the start.sh script to include the full path to your variables.txt file.

I’ll look into reporting this to ServerPackCreator or at least updating the readme.

Griefed commented 10 months ago

Please try running the script like this ./start.sh and see whether that works out.

EDIT: Reasoning: The Linux scripts are bash-scripts, as indicated by the shebang in the first line of them #!/bin/bash or #!/usr/bin/env bash (depending on which version of ServerPackCreator was used in the making of the server pack), so explicitly running said script with a regular shell might result in unintended behavior, as indicated by

Running bash start.sh could also work. I'm just more used to ./start.sh myself.

Pendrag00n commented 10 months ago

The shebang clearly depicts that the script is meant to be ran by bash instead of sh. You should always run scripts using ./script so that scripts are ran using the interpreted used in the shebang.

muon-rw commented 10 months ago

^ This is actually not the same error users have been experiencing as described in the ServerPackCreator report, my mistake for skimming over this one and linking it as an example.

Run with bash or ./ to fix this particular issue.

12xsunx12 commented 9 months ago

Thanks a lot for everyone's input. I really appreciate it :).

I had a few servers in the past that only worked with "sh " so I'll use the default method and see what happens.

Appreciate it <3