Linux Local Launcher

Discussion in 'Bukkit Help' started by Rellac, Aug 30, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Rellac

    So I have recently decided to move to a Linux system (Ubuntu) and I would like to launch my local testing server from this location.

    When I researched, I found a lot of answers involving a lot of lines in the terminal, but I would much rather not have to faff about so much each time I want to launch the server. When testing, I do a lot of stopping and starting of the server, which can't be properly handled via bukkit commands.

    With my old windows system, I would generally use a bat file to run my server as such:

    @echo off
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1024M -jar craftbukkit.jar
    pause

    And this would launch my server just fine and dandy. However, Linux doesn't support batch files afaik and the syntax for bash files are supposedly different and I'm not entirely sure how I would handle this. I'm also not sure where the default installation location for java is within Linux.

    If anyone could point me in the right direction for a simple click-to-run server file, I would be greatly appreciative, thanks.
     
  2. Offline

    LHammonds

    When you say "click-to-run" I assume you are talking about Ubuntu Desktop (with a GUI).

    I do not run any GUI interfaces with Ubuntu...just command-line server.

    However, Ubuntu Desktop is pretty-much the same thing as server but with a gui attached and extra programs.

    The batch file equivalent in Linux are shell scripts. Mostly Bash scripts that tend to end in .sh but do not have to.

    Here is a basic start-server.sh script but I like to use SCREEN to push multiple servers into a "screen" instance and control via scripts.

    start-server.sh
    Code:
    #!/bin/bash
    java -d64 -XX:MaxPermSize=128M -Xincgc -Xmx1024M -jar /opt/craftbukkit/server.jar --log-strip-color
    
    That is about as simple as I can make it but my setups are a LOT more complicated but allow me to run many servers, automate backups, automatic restarts if MC shutsdown or crashes, reboots, etc. via these Bash scripts and crontab schedules.
     
    Rellac likes this.
  3. Offline

    Rellac

    LHammonds Thanks a lot, this seems to be working :D
     
  4. Offline

    LHammonds

    You are welcome. If you want to make the jump to a production server-type environment, let me know. I can give you pointers.
     
Thread Status:
Not open for further replies.

Share This Page