June 4, 201313 yr Hey, Noob question, so i apologise. I've set up a Minecraft server to run on unRAID and it seems to be working as it should. I have created a script (called 'go')... #!/bin/bash cd /mnt/cache/Minecraft/ nohup java -Xmx128M -Xms128M -jar minecraft_server.jar nogui & to start the server, which works perfectly. But i would like to be able to run the Minecraft 'go script' from unRAIDs 'go script', so i dont have to telnet in everytime i restart the server. I have tried putting... /mnt/cache/Minecraft./go into unRAIDs go script, but nothing happens and i still need to telnet into unRAID and start the Minecraft server with the following commands... cd /mnt/cache/Minecraft go I have to enter 'go' as a separate command in telnet, so i'm assuming thats the problem in putting it into the unRAID go script, as i entered it as one command. I dont know an alternative way to enter 'go' as a secondary command though? Any help would be appreciated. Thank you, Rich
June 4, 201313 yr There are two issues. First, your syntax A line like this will do it /mnt/cache/Minecraft/go HOWEVER... At the time the command is being run in the config/go script the odds are emhttp has not yet started the array or mounted the cache drive. you need to wait for it to be present. Something like this might work. while [[ ${LOOP:=30} -gt 1 && ! -d /mnt/cache/Minecraft ]] do (( LOOP=LOOP-1 )) echo "Waiting for /mnt/cache to come online ($LOOP)" sleep 1 done /mnt/cache/Minecraft/go Add those lines to the END of the config/go script. There will be another issue though in that the server will likely NOT stop properly since the cache drive will be busy unless you STOP the minecraft server first. A much better method is to tie int the "event" system in unRAID. See this post for how http://lime-technology.com/forum/index.php?topic=26201.0
June 5, 201313 yr Author Thanks for the quick reply Joe, but unfortunately neither of those worked Would that be because of my script?
June 5, 201313 yr Thanks for the quick reply Joe, but unfortunately neither of those worked Would that be because of my script? Did you make your script executable? chmod +x /mnt/cache/Minecraft/go Are you using the correct "case" (Linux is case-sensitive.) Minecraft != minecraft Is "java" in your path? is it even installed? (it does not come with unRAID) Joe L.
June 5, 201313 yr Author The destinations within the script (please see 1st post) are definitely accurate (case included) because the script works when executed via telnet with the following command /mnt/cache/Minecraft/go I have run the executable command that you posted above, just to be sure, but still no go and as for java, i have the following 'Jre - Java 2 Platform Standard Edition Runtime Environment,' set to auto re-install via unmenu. I'm not sure if it could be something to do with the line of my script that actually starts the Minecraft server? nohup java -Xmx128M -Xms128M -jar minecraft_server.jar nogui & Could that be conflicting with something when trying to start from unRAIDs go script?
June 6, 201313 yr Are you absolutely sure that your JRE is available by the time that the Minecraft go script is called from the system go script?
June 6, 201313 yr Author Not 100% i guess, but i added 'sleep 50' before the command in the go script, to try and make Minecraft boot last. Do you think 50 seconds is too quick?
June 7, 201313 yr changed it to 120 and still nothing Have you checked the contents of the nohup.out file that the nohup command creates? My best guess at this point is that java is not in the execution PATH I would also look on the system console for any error messages as startup occurs. Other than that, you might zip up your "go" file and attach it for analysis. You might have something wrong we can't see without looking at it.
Archived
This topic is now archived and is closed to further replies.