How do i turn this line of code from .bat to .sh

Discussion in 'Spigot Help' started by FlameFOxYT, Feb 1, 2020.

  1. How do i turn this line of code from .bat to .sh

    @Echo OFF
    :RESTART
    java -jar Spigot.jar
    goto RESTART

    This .bat line of code is perfect for servers. if your server crashed, it can turn on the server again,
    the problem is my host is using .sh files and does not accept .bat files. how do i change it to
    .sh?
     
  2. Code (Text):
    while true
    do
    java -jar Spigot.jar
    done
     
  3. Strahan

    Benefactor

    I wouldn't say "perfect"; it should have a "do you want to restart?" prompt after the java line, with a one or two second timeout to yes so if you stop the server intentionally you don't have to ^C really fast to prevent a restart.