Upgpkg: 1.9.2-4

Reset no_player timer after the server has been shut down.
This commit is contained in:
Gordian Edenhofer 2016-04-03 18:00:41 +02:00
parent 0a4c078d75
commit e41789c522
3 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
pkgbase = minecraft-server pkgbase = minecraft-server
pkgdesc = Minecraft server unit files, script, and jar pkgdesc = Minecraft server unit files, script, and jar
pkgver = 1.9.2 pkgver = 1.9.2
pkgrel = 3 pkgrel = 4
url = http://minecraft.net/ url = http://minecraft.net/
install = minecraft-server.install install = minecraft-server.install
arch = any arch = any
@ -15,7 +15,6 @@ pkgbase = minecraft-server
conflicts = minecraft-server-systemd conflicts = minecraft-server-systemd
conflicts = minecraft-canary conflicts = minecraft-canary
noextract = minecraft_server.1.9.2.jar noextract = minecraft_server.1.9.2.jar
options = !strip
backup = etc/conf.d/minecraft backup = etc/conf.d/minecraft
source = https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar source = https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar
source = minecraftd-backup.service source = minecraftd-backup.service
@ -28,6 +27,6 @@ pkgbase = minecraft-server
md5sums = fef6fadd0739ae03ff71ba61025be207 md5sums = fef6fadd0739ae03ff71ba61025be207
md5sums = afb84ad0316af0aca421b36eaa2bbd90 md5sums = afb84ad0316af0aca421b36eaa2bbd90
md5sums = 00045683c06924d765ac14887218ffcc md5sums = 00045683c06924d765ac14887218ffcc
md5sums = 07fc6725f5354e4eca5a56c039577764 md5sums = 1f31f0e0ee859ed43b512121b61edc69
pkgname = minecraft-server pkgname = minecraft-server

View File

@ -4,7 +4,7 @@
pkgname=minecraft-server pkgname=minecraft-server
pkgver=1.9.2 pkgver=1.9.2
pkgrel=3 pkgrel=4
pkgdesc="Minecraft server unit files, script, and jar" pkgdesc="Minecraft server unit files, script, and jar"
arch=('any') arch=('any')
url="http://minecraft.net/" 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") "netcat: required in order to suspend an idle server")
conflicts=('minecraft-server-systemd' 'minecraft-canary') conflicts=('minecraft-server-systemd' 'minecraft-canary')
backup=('etc/conf.d/minecraft') backup=('etc/conf.d/minecraft')
options=(!strip)
install="${pkgname}.install" install="${pkgname}.install"
source=("https://s3.amazonaws.com/Minecraft.Download/versions/${pkgver}/minecraft_server.${pkgver}.jar" source=("https://s3.amazonaws.com/Minecraft.Download/versions/${pkgver}/minecraft_server.${pkgver}.jar"
"minecraftd-backup.service" "minecraftd-backup.service"
@ -28,7 +27,7 @@ md5sums=('560d467028f17a70997151ed0053deb6'
'fef6fadd0739ae03ff71ba61025be207' 'fef6fadd0739ae03ff71ba61025be207'
'afb84ad0316af0aca421b36eaa2bbd90' 'afb84ad0316af0aca421b36eaa2bbd90'
'00045683c06924d765ac14887218ffcc' '00045683c06924d765ac14887218ffcc'
'07fc6725f5354e4eca5a56c039577764') '1f31f0e0ee859ed43b512121b61edc69')
_game="minecraft" _game="minecraft"
_server_root="/srv/minecraft" _server_root="/srv/minecraft"

View File

@ -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!" [[ $i -eq 100 ]] && echo -e "An \e[39;1merror\e[0m occurred while trying to reset the idle_server!"
sleep 0.1 sleep 0.1
done 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..." echo "Netcat is listening on port ${GAME_PORT} for incoming connections..."
${NETCAT_CMD} -v -l -p ${GAME_PORT} ${NETCAT_CMD} -v -l -p ${GAME_PORT}
[[ $? -eq 0 ]] && echo "Netcat caught an connection. The server is coming up again..." [[ $? -eq 0 ]] && echo "Netcat caught an connection. The server is coming up again..."
@ -110,10 +112,12 @@ idle_server_daemon() {
no_player=0 no_player=0
fi fi
else else
# Reset timer
no_player=0
# Game server is down, listen on port ${GAME_PORT} for incoming connections # Game server is down, listen on port ${GAME_PORT} for incoming connections
echo "Netcat is listening 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} ${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 IDLE_SERVER="false" ${myname} start
fi fi
done done