Last active
August 29, 2015 14:02
-
-
Save aaomidi/5790d45cce7c972d21fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd /mc/servers | |
for name in *; do | |
mark2 send -n "$name" say "Hey players! We're stopping the server to update them! Please join back in 10 minutes" | |
mark2 send -n "$name" stop ||true | |
done | |
echo "Starting to download updates and place them in the servers!" >&2 | |
wget http://ci.md-5.net/job/Spigot/lastSuccessfulBuild/artifact/Spigot-Server/target/spigot.jar -O ~/server.jar | |
sleep 1m | |
for name in *; do | |
cp -f ~/server.jar "$name" | |
echo "Updated $name" >&2 | |
mark2 start -i | |
done | |
echo "Update has sucessfully finished" >&2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment