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
9 rm /srv/minecraft/minecraft_servero.jar
11 ==> World data is stored under /srv/minecraft
12 ==> The server runs as "minecraft", not root
13 ==> You can access the server's console as root with:
15 ==> The systemd service is called "minecraftd.service"
16 ==> Calling "stop" or "restart" with systemctl will gracefully exit the server, saving world data
17 ==> Modify /usr/bin/minecraftd to change the invocation of the server if you wish
24 if getent passwd "minecraft" >/dev/null; then
25 userdel minecraft >/dev/null
27 if getent group "minecraft" >/dev/null; then
28 groupdel minecraft >/dev/null
31 # Sections of this .install file were lovingly borrowed from
32 # aur/minecraft-server