06-24-2014, 06:04 AM
Hi all.
I'm very new to Minecraft, however I've been persuaded (read bullied) into setting up a server for my daughter and some of her mates to have a blast on without having to worry about the world + dog hurling abuse at them. I had a spare Raspberry Pi, and after some research I came to MCServer. All downloaded, installed and running with a minimum of fuss, so my thanks to all of the devs for their work.
Having had a little experience with servers and Linux over the years, I'm very much of the opinion that regular jobs like backups and updates should be completely automated. I've set up a bash script to back up the MCServer files, tar them up and FTP them from the Raspi to another machine as a backup, and another script to check whether an updated executable is available (on Bearbin's site) and if there is one to download and install it. There are a couple of others for housekeeping stuff. All of that is set up so it can be run on Cron jobs.
In order for this to work the way I'd like it to, I'd prefer the MCServer executable to run in a headless mode, and I'd like to be able to run and terminate it under control of a Cron job so I can shut it down cleanly at (say) 2am, then do my backup/update/housekeeping stuff and then restart the executable at 6am. I've seen some discussion on the forums about detecting the MCServer process and killing it, however that would run the risk of losing data.
Is it possible to issue commands to the MCServer program through Cron jobs?
I'm very new to Minecraft, however I've been persuaded (read bullied) into setting up a server for my daughter and some of her mates to have a blast on without having to worry about the world + dog hurling abuse at them. I had a spare Raspberry Pi, and after some research I came to MCServer. All downloaded, installed and running with a minimum of fuss, so my thanks to all of the devs for their work.
Having had a little experience with servers and Linux over the years, I'm very much of the opinion that regular jobs like backups and updates should be completely automated. I've set up a bash script to back up the MCServer files, tar them up and FTP them from the Raspi to another machine as a backup, and another script to check whether an updated executable is available (on Bearbin's site) and if there is one to download and install it. There are a couple of others for housekeeping stuff. All of that is set up so it can be run on Cron jobs.
In order for this to work the way I'd like it to, I'd prefer the MCServer executable to run in a headless mode, and I'd like to be able to run and terminate it under control of a Cron job so I can shut it down cleanly at (say) 2am, then do my backup/update/housekeeping stuff and then restart the executable at 6am. I've seen some discussion on the forums about detecting the MCServer process and killing it, however that would run the risk of losing data.
Is it possible to issue commands to the MCServer program through Cron jobs?