Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
fixed script adding comment in each restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Okazakee committed Jan 22, 2023
1 parent ba3da44 commit b86d37b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This is a Linux Docker image for creating Minecraft servers with `lazymc`.
This image provides a basic PaperMC (or alternatives) server. All customizations are left to the user.

# To do:
- [x] Automatically insert server variables inside lazymc.toml
- [x] Automatically update server variables inside lazymc.toml.
- [ ] Add support for more server providers, please let me know in issues if you want to add new ones.
- [ ] Better logging, remove useless console outputs and give the user clear and clean messages of what is going on.
- [ ] Add Docker Compose section in this README.
- [ ] Build a stati webpage for the project.
- [ ] Build a static webpage for the project.
- [ ] Do not trgger github actions when README or actions yml get pushed.

# Usage
Expand Down
7 changes: 6 additions & 1 deletion mcserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ then
else
# Add new values to lazymc.toml
echo "Updating lazymc.toml with latest details"
sed -i '/Command to start the server/i # Managed by mcserver-lazymc-docker, please do not edit this!' lazymc.toml
# Check if the comment is already present in the file
if ! grep -q "mcserver-lazymc-docker" lazymc.toml;
then
# Add the comment to the file
sed -i '/Command to start the server/i # Managed by mcserver-lazymc-docker, please do not edit this!' lazymc.toml
fi
sed -i "s~command = .*~command = \"java $JAVA_OPTS -jar $JAR_NAME nogui\"~" lazymc.toml
fi

Expand Down

0 comments on commit b86d37b

Please sign in to comment.