[0.4.7] Server start and settings files changed encoding
willbattel opened this issue · 2 comments
Modpack version
0.4.7
Describe the bug
I run a server on my Ubuntu machine currently on 0.4.1
that I am attempting to update to 0.4.7
. I downloaded and extracted the files as normal but ran into an issue starting the server. It seems to be due to different encoding of server-start.sh
and settings.cfg
(and possibly others). You can see this if you compare the file sizes of the 0.4.7 files against the 0.4.1 files. Please see below.
Logs
First error that can be fixed with perl -pi -e 's/\r//' server-start.sh
, credit to dravik on Discord for the idea.
bash server-start.sh
server-start.sh: line 27: $'\r': command not found
server-start.sh: line 29: $'\r': command not found
server-start.sh: line 30: $'\r': command not found
server-start.sh: line 46: $'\r': command not found
server-start.sh: line 48: syntax error near unexpected token `$'in\r''
'erver-start.sh: line 48: `case "${unameOut}" in
After fixing server-start.sh
, I encounter this next error (and Forge does not install) which can then be fixed with perl -pi -e 's/\r//' settings.cfg
.
bash server-start.sh
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
About to start server. Force re-install (y/n)? y
User chose to manually re-install server files
Starting install of Forge/Minecraft server binaries
https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.0/forge-1.16.5-36.1.0-installer.jar;
Moving unneeded files/folders to ./DELETEME
Installing Forge Server, please wait...
Deleting Forge installer (no longer needed)
server-start.sh: line 160: [: 0;: integer expression expected
Ping to Google DNS successfull
Ping to L4 successfull
Required files not found, need to install Forge
Starting install of Forge/Minecraft server binaries
https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.0/forge-1.16.5-36.1.0-installer.jar;
Moving unneeded files/folders to ./DELETEME
Installing Forge Server, please wait...
Deleting Forge installer (no longer needed)
Required files not found, need to install Forge
Starting install of Forge/Minecraft server binaries
https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.0/forge-1.16.5-36.1.0-installer.jar;
Moving unneeded files/folders to ./DELETEME
Installing Forge Server, please wait...
Deleting Forge installer (no longer needed)
Starting server
Error: Unable to access jarfile forge-1.16.5;-36.1.0;.jar
server-start.sh: line 289: [: 5;: integer expression expected
Server will restart in ~10 seconds. No input needed...
Restart now (y) or exit to shell (n)? n
After fixing these two files, I am able to start the server as normal.
Screenshots
N/A
Dammit, sorry about that. I tried using different Git settings as the ones that preserve LF properly are annoying to develop with.