seyfahni / minecraft-server-scripts Goto Github PK
View Code? Open in Web Editor NEWLinux shell scripts and systemd units to help with setting up and maintaining minecraft servers.
License: MIT License
Linux shell scripts and systemd units to help with setting up and maintaining minecraft servers.
License: MIT License
@roxeteer reported in #2, about bd72db5:
Didn't actually manage to get the latest version to run on a new Ubuntu server at all […]. Downgraded to the previous version that I already had running on a different server, and that worked without a hitch.
This is what the master version status said:
$ minecraftctl status mine2 ● [email protected] - Minecraft Dedicated Server mine2 Loaded: loaded (/etc/systemd/system/[email protected]; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Mon 2021-05-24 17:29:12 CEST; 37s ago Process: 5551 ExecStop=/usr/bin/screen -S minecraft-mine2 -p 0 -X stuff stop^M (code=exited, status=1/FAILURE) Process: 5548 ExecStart=/usr/bin/screen -dmS minecraft-mine2 -- $JAVA_RUNTIME -server -Xms2G -Xmx2G -XX:+UseG1GC Main PID: 5549 (code=exited, status=0/SUCCESS)
Hi,
What permissions does the minecraft
user need?
I've got the user set up using useradd --system --no-create-home --home /opt/minecraft -g minecraft minecraft
yet when executing minecraftctl start {instance name}
either with the user minecraft
or root I get the following prompt.
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'minecraft@{instance name}.service'.
Authenticating as: root
Password:
To get around this online sources mention the use of a sudoers entry, which I've tried the below as a catch-all for the moment yet it didn't work.
%minecraft ALL=(ALL) NOPASSWD:ALL
The only way I managed to get the script to run without the prompt is by using sudo and removing the below from minecraftctl
if [[ "$(id -un)" != "$MINECRAFT_USER" ]]; then
sudo -n -u "$MINECRAFT_USER" "$SAFE_SELF" "$@"
exit
fi
I'm sure I'm missing something,
Thanks in advance.
Linux version 5.4.0-77-generic (buildd@lgw01-amd64-028) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04))
I can't find any instructions how to exit the server console.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.