summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordian Edenhofer2016-04-03 18:00:41 +0200
committerGordian Edenhofer2016-04-03 18:00:41 +0200
commite41789c522279527ce0aaf8be32cce646c3d7388 (patch)
tree35dea49c70a51fdcd655049d3a9cd44d6077149a
parent0a4c078d7548b022203bbd9d3f24c8f1f05e0387 (diff)
downloadaur-e41789c522279527ce0aaf8be32cce646c3d7388.tar.gz
Upgpkg: 1.9.2-4
Reset no_player timer after the server has been shut down.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD5
-rwxr-xr-xminecraftd.sh8
3 files changed, 10 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6cc09eb2306..6614907fadd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = minecraft-server
pkgdesc = Minecraft server unit files, script, and jar
pkgver = 1.9.2
- pkgrel = 3
+ pkgrel = 4
url = http://minecraft.net/
install = minecraft-server.install
arch = any
@@ -15,7 +15,6 @@ pkgbase = minecraft-server
conflicts = minecraft-server-systemd
conflicts = minecraft-canary
noextract = minecraft_server.1.9.2.jar
- options = !strip
backup = etc/conf.d/minecraft
source = https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar
source = minecraftd-backup.service
@@ -28,6 +27,6 @@ pkgbase = minecraft-server
md5sums = fef6fadd0739ae03ff71ba61025be207
md5sums = afb84ad0316af0aca421b36eaa2bbd90
md5sums = 00045683c06924d765ac14887218ffcc
- md5sums = 07fc6725f5354e4eca5a56c039577764
+ md5sums = 1f31f0e0ee859ed43b512121b61edc69
pkgname = minecraft-server
diff --git a/PKGBUILD b/PKGBUILD
index b1a7117f228..c8c1a6d1888 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=minecraft-server
pkgver=1.9.2
-pkgrel=3
+pkgrel=4
pkgdesc="Minecraft server unit files, script, and jar"
arch=('any')
url="http://minecraft.net/"
@@ -14,7 +14,6 @@ optdepends=("tar: needed in order to create world backups"
"netcat: required in order to suspend an idle server")
conflicts=('minecraft-server-systemd' 'minecraft-canary')
backup=('etc/conf.d/minecraft')
-options=(!strip)
install="${pkgname}.install"
source=("https://s3.amazonaws.com/Minecraft.Download/versions/${pkgver}/minecraft_server.${pkgver}.jar"
"minecraftd-backup.service"
@@ -28,7 +27,7 @@ md5sums=('560d467028f17a70997151ed0053deb6'
'fef6fadd0739ae03ff71ba61025be207'
'afb84ad0316af0aca421b36eaa2bbd90'
'00045683c06924d765ac14887218ffcc'
- '07fc6725f5354e4eca5a56c039577764')
+ '1f31f0e0ee859ed43b512121b61edc69')
_game="minecraft"
_server_root="/srv/minecraft"
diff --git a/minecraftd.sh b/minecraftd.sh
index a53bcdea572..abf35ea6b02 100755
--- a/minecraftd.sh
+++ b/minecraftd.sh
@@ -100,7 +100,9 @@ idle_server_daemon() {
[[ $i -eq 100 ]] && echo -e "An \e[39;1merror\e[0m occurred while trying to reset the idle_server!"
sleep 0.1
done
- # Listen on port ${GAME_PORT} for incoming connections
+ # Reset timer
+ no_player=0
+ # Game server is down, listen on port ${GAME_PORT} for incoming connections
echo "Netcat is listening on port ${GAME_PORT} for incoming connections..."
${NETCAT_CMD} -v -l -p ${GAME_PORT}
[[ $? -eq 0 ]] && echo "Netcat caught an connection. The server is coming up again..."
@@ -110,10 +112,12 @@ idle_server_daemon() {
no_player=0
fi
else
+ # Reset timer
+ no_player=0
# Game server is down, listen on port ${GAME_PORT} for incoming connections
echo "Netcat is listening on port ${GAME_PORT} for incoming connections..."
${NETCAT_CMD} -v -l -p ${GAME_PORT}
- echo "Netcat caught an connection. The server is coming up again..."
+ [[ $? -eq 0 ]] && echo "Netcat caught an connection. The server is coming up again..."
IDLE_SERVER="false" ${myname} start
fi
done