On my server I have a running MC server (java- it runs in console), the script currently looks like this.
cd '/home/jed/minecraft-server/' date=$(date +"%m-%d-%Y") time=$(date +"%H:%M:%S") echo $time ' ' $date cp -r 'world/' 'backups/serverStartBak.'$date'.'$time java -Xmx1024M -Xms1024M -jar minecraft_server.jar noguiThis code creates a backup of the world with a time-stamp before starting the MC server Java app. However once the program is running I want to run the command "save-off" (this stops it from automatically saving to the world file) and then every 15 minutes run the command "save-all" before repeating the backup process in the above code (line 5)- This will basically mean that I can restore the server if anyone griefs (I have a program to help me patch together chunks so as not to rollback the entire server).
Really the only thing I need help with is the inserting commands part the rest should be easy.
p.s. When I loaded this code in notepad it was all one line so I fixed that then copy pasted it into codecall, However when I did this all the lines were pushed apart as if I had entered twice and one which I had forgot to put on its own line was now on its own line. Obviously CODECALL could see the new lines that notepad couldn't... anyone know how to fix this??


Sign In
Create Account


Back to top









