summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordian Edenhofer2016-04-03 13:43:10 +0200
committerGordian Edenhofer2016-04-03 13:43:10 +0200
commit87f0b53c40ffe6968121cb5e6789b397a3e406fb (patch)
treed951d91201562e472dee821312bcb3d3495025bb
parent349829f1e1f5aea7eebda0316694fbdb2cc54b41 (diff)
downloadaur-87f0b53c40ffe6968121cb5e6789b397a3e406fb.tar.gz
Upgpkg: 1.9.2-2
Do not save server files immediately before going down in case there is no player on the server. The files are saved on shutdown eitherway and the save-all command heavily delays the list command which is triggered later.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rwxr-xr-xminecraftd.sh6
3 files changed, 4 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d5d647e472c..8c4d0280b83 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -28,6 +28,6 @@ pkgbase = minecraft-server
md5sums = fef6fadd0739ae03ff71ba61025be207
md5sums = afb84ad0316af0aca421b36eaa2bbd90
md5sums = 00045683c06924d765ac14887218ffcc
- md5sums = f130c76d285297071c3e0d2988631dfe
+ md5sums = bdd49792d54f147cd2f6048f1559d676
pkgname = minecraft-server
diff --git a/PKGBUILD b/PKGBUILD
index 96f6d4ced17..5d5821d1b78 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,7 +28,7 @@ md5sums=('560d467028f17a70997151ed0053deb6'
'fef6fadd0739ae03ff71ba61025be207'
'afb84ad0316af0aca421b36eaa2bbd90'
'00045683c06924d765ac14887218ffcc'
- 'f130c76d285297071c3e0d2988631dfe')
+ 'bdd49792d54f147cd2f6048f1559d676')
_game="minecraft"
_server_root="/srv/minecraft"
diff --git a/minecraftd.sh b/minecraftd.sh
index 597eb0bf118..4ef6997592b 100755
--- a/minecraftd.sh
+++ b/minecraftd.sh
@@ -180,10 +180,7 @@ server_stop() {
# Gracefully exit the game server
${SUDO_CMD} screen -S "${SESSION_NAME}" -Q select . > /dev/null
if [[ $? -eq 0 ]]; then
- # Game server is up and running
- game_command save-all
-
- # Gracefully stop the server when there are still active players
+ # Game server is up and running, gracefully stop the server when there are still active players
${SUDO_CMD} screen -S "${SESSION_NAME}" -X stuff "`printf \"list\r\"`"
# The list command prints a line containing the usernames after the last occurrence of ": "
# and since playernames may not contain this string the clean player-list can be easily retrieved.
@@ -195,6 +192,7 @@ server_stop() {
# Player(s) were seen on the server through list (or an error occurred)
# Warning the users through the server console
game_command say "Server is going down in 10 seconds! HURRY UP WITH WHATEVER YOU ARE DOING!"
+ game_command save-all
echo -en "Server is going down in..."
for i in {1..10}; do
game_command say "down in... $(expr 10 - $i)"