Solved Delete world file on restart script

Discussion in 'Spigot Help' started by GeorgeeeHD, Jun 21, 2016.

  1. Does anyone have or know how to make a script that deletes the world file when the server restarts? I want to have a fresh world every time the server restarts.

    Thanks for any help.
     
  2. You running Linux?
     
  3. yes
     
  4. Hey George,
    I Really don't think this is possible...
    I'd talk to @mathhulk
     
  5. I'm like 90% sure its a 2 line bash script, I just don't know how to do it.
     
  6. There must be a thousand different ways this is possible.
    OP, I'd imagine you're using a restart script? include a simple "rm -R world/" in it.
    Code (Text):
    #!/bin/bash
    rm -r world/

    exit
     
    • Like Like x 1
    • Agree Agree x 1
  7. foncused

    Moderator Patron

    It is absolutely possible - I do it myself! :D

    If you are already using a startup or loop script, just edit it to rm (remove) the old world files from {world_directory}/ and cp (copy) the world files you want to load into {world_directory}/. I usually just create a second directory in the server's directory and name it {whatever_your_world's_name_is}_backup/ and copy in the fresh world from there.
     
  8. alright thanks man :)
     
  9. Oh Really? Welp... Didn't Know. You know what they say, "You learn something new everyday".
    *Starts feeling stupod*