1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Restart Script Not Working In-Game?

Discussion in 'Bugs & Feature Requests' started by Solenz, May 11, 2013.

  1. Can anyone please help? When I restart my server using the console/terminal it restarts successfully but when I use the in-game /restart command it only stops the server. I checked the server logs and it only stops the server and doesn't restart. Also, the bukkit.yml is already configured to know where the restart script is located correctly. I know this because I can use restart in the console. Thanks for the help.
     
  2. What plugin/ script are you using?
     
  3. I'm using the same script I use to start the server. But, I renamed it restart.sh. I also gave it the correct permissions to run. I'll upload my scripts if needed. They are not prebuilt, I manually made them.
     
  4. Solenz,
    How do you expect people to help if they have no idea what you are using to restart/start/stop the server?
     
  5. This is what i use on my centos dedicated server:
    Code (Text):
    #!/bin/sh
     
    cd "/home/DomM/Servers/$1"
     
    echo "Server starting in:"
    for i in 5 4 3 2 1
    do
    echo "$i..."
    sleep 1
    done
    echo "Server starting now!"
    java -Xmx$2 -Xms$3 -jar $4.jar nogui
    the $number is where i use a profiler, imagine them as normal jar names and numbers etc.

    This way you can just type /stop and it stops, then restarts the server. You need to manually close the console window/screen to stop it
     
  6. I can use this on my raspberry pi with modifications? It runs a port of Debian Linux. Say like replacing the cd locations? Thanks
     
  7. Solenz Should work fine on your Pi :)

    Just replace the locations,and your memory values and the jar name :D
     
  8. Sorry for reviving this old thread but does the restart script incorporate the screen command?
    If it doesn't how do I implement it? Thanks Dominic.
     
  9. Code (Text):

    [SIZE=13px][FONT=Consolas]#!/bin/sh[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas] [/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]echo "Server starting in:"[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]for i in 5 4 3 2 1[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]do[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]echo "$i..."[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]sleep 1[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]done[/FONT][/SIZE]
    [SIZE=13px][FONT=Consolas]echo "Server starting now!"[/FONT][/SIZE]
    [SIZE=2][FONT=Consolas]BINDIR=$(dirname "$(readlink -fn "$0")")[/FONT][/SIZE]
    [SIZE=2][FONT=Consolas] cd "$BINDIR"[/FONT][/SIZE]
    [SIZE=2][FONT=Consolas] sudo screen /opt/jdk1.8.0/bin/java -Xms512M -Xmx512M -jar /home/pi/Spigot/spigot-1.5.2-R0.2-SNAPSHOT.jar -o false[/FONT][/SIZE]
    [SIZE=2][FONT=Consolas]
    try something like that, but no it doesn't. [/FONT][/SIZE]
     
  10. Ooops something went wrong there
     
  11. I modified the script to include screen and sadly it doesn't work. :'(
    After Spigot stops the server it says screen terminated but the server never restarts. It just stops it. Please tell me if you need me to upload my script. Thanks again.
     
  12. No idea then, sorry!