2

I run a Ubunut 14.04 64Bit Server and try to get a vanilla Minecraft server to run as a Service. I found a good script here: http://minecraft.gamepedia.com/Tutorials/Server_startup_script

I set it up as descriped there as well and edited the needed paramters. When i now try to run the server "service minecraft start" I get the following:

Starting minecraft_server.1.8.3.jar... /etc/init.d/minecraft: 34: [: fabian: unexpected operator

As i can programm myself i can tell that the problem is the line "if [ "$ME" = "$USERNAME" ] ; then" but i'm not sure how to fix this. In the script there is a variable "USERNAME" and I'm unsure as to what to put there. I created a dedicated user "minecraft" for this purpuse but this doesn't work, neither does my main user "fabian".

It then asks me for the password for the user, I enter it correctly, it outputs: "minecraft_server.1.8.3.jar is now running." but when I try to connect (be it from LAN or WAN) it says "Can't connect to server" portforwarding must be corret as i can connect to the server when i run a start script manually.

Any ideas? Thanks for your help!

0

1 Answer 1

1

It sounds like you're running the script with sh instead of bash. Make sure the first line of the file is:

#!/bin/bash

with no space before the #.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .