Anyone know why this restart.sh script is not broadcasting the server restart message?

Discussion in 'Spigot Discussion' started by Soulwatcher, Apr 2, 2020.

  1. Does anyone know why this restart.sh script is not broadcasting the restart message? The server restarts with no message.

    Code (Text):
    #!/bin/sh
    screen -s server -X stuff "broadcast &cServer rebooting in 3 minutes."
    screen -s server -X eval "stuff \015"
    sleep 60
    screen -s server -X stuff "broadcast &cServer rebooting in 2 minutes."
    screen -s server -X eval "stuff \015"
    sleep 60
    screen -s server -X stuff "broadcast &cServer rebooting in 1 minute."
    screen -s server -X eval "stuff \015"
    sleep 60
    screen -s server -X stuff "broadcast &cServer rebooting..."
    screen -s server -X eval "stuff \015"
    screen -s server -X stuff "kickall Rebooting. Please reconnect in one minute."
    screen -s server -X eval "stuff \015"
    sleep 5
    screen -s server -X stuff "stop"
    screen -s server -X eval "stuff \015"
    sleep 15
    cd <path to the folder your startup script is stored in>
    ./start.s
     
    #1 Soulwatcher, Apr 2, 2020
    Last edited: Apr 2, 2020
  2. Bump, can someone please help me?
     
  3. Hmm, I just made a own script that automatically restarts the server on crash and it works perfectly. You could make a script that stops the server at a given time and use a simple start.sh auto-restart script.