.sh startup scripts fail. Putting startup script in console works

Discussion in 'Spigot Discussion' started by AK138, May 24, 2013.

  1. Hi guys,

    When I direct to the start.sh file and open it it just doesn't work. I have no idea why. When I direct to the folder with terminal and put the startup script it terminal, It works! Why is that?
    Code (Text):
    #!/bin/sh
    BINDIR=$(dirname "$(readlink -fn "$0")")
    cd "$BINDIR"
    java -Xms2048M -Xmx4096M -jar spigot.jar
     
    Thats my startup script. That is my second server on my machine. My other server works perfectly fine and uses the same startup script except different flags for RAM.

    Thanks,

    AK139
     
  2. What does it say if you do screen -S Test scriptname.sh
     
  3. I don't use SSH.
    I use ubuntu remote desktop.
     
  4. Well then, is there a console or error log?
     
  5. I added "PAUSE" at the end of my script. It still didn't pause. It opened for a brief second then closed. When I manually direct the the directory and use the script there it works perfectly fine.
     
  6. Remove

    BINDIR=$(dirname "$(readlink -fn "$0")")
    cd "$BINDIR"

    and put the bash script in the same dir as the spigot.jar
     
    • Agree Agree x 1
  7. jtaylor69

    jtaylor69 Retired Moderator
    Retired

    Sometimes right clicking the file, going to properties and checking open as an executable helps.
     
  8. vemacs

    Artist

    Code (Text):
    chmod +x start.sh
     
  9. Did that. Terminal opens for a brief second then closes.
    Already did that doesn't work.
    Nope.

    Could it be my port? The port that I'm trying to run it on is 25560. Will that work for minecraft?
     
  10. 25560 if it is not in use it will work.
     
  11. All ports are open.