#!/bin/bash

cd /home/ubuntu/minecraft
if [ -f "start.sh" ]; then
    cmd="/bin/bash start.sh"
else
    cmd="java -Xmx1024M -Xms1024M -jar server.jar nogui"
fi

tmux new-session -Ad -s "minecraft server" $cmd
