6 getent group "minecraft" &>/dev/null || groupadd -r minecraft 1>/dev/null
7 getent passwd "minecraft" &>/dev/null || useradd -r -g minecraft -d "/var/empty" -s "/bin/sh" minecraft 1>/dev/null
8 chown -R minecraft:minecraft "/srv/minecraft" 1>/dev/null
10 ==> World data is stored under /srv/minecraft
11 ==> The server runs as "minecraft", not root
12 ==> You can access the server's console as root with:
14 ==> The systemd service is called "minecraftd.service"
15 ==> Calling "stop" or "restart" with systemctl will gracefully exit the server, saving world data
16 ==> Modify /usr/bin/minecraftd to change the invocation of the server if you wish
23 if getent passwd "minecraft" >/dev/null; then
24 userdel minecraft >/dev/null
26 if getent group "minecraft" >/dev/null; then
27 groupdel minecraft >/dev/null
30 # Sections of this .install file were lovingly borrowed from
31 # aur/minecraft-server