upgpkg: minecraft-server 1.9.4-1
Reset timer to ( IDLE_IF_TIME - 300 seconds [5 min.] ) on shutdown, so after pinging the server it will go down earlier instead of waiting the full IDLE_IF_TIME. This only affects the idle_server_daemon.
This commit is contained in:
parent
3fc4b8ae1d
commit
53bb3e0764
12
.SRCINFO
12
.SRCINFO
|
@ -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.4
|
||||||
pkgrel = 4
|
pkgrel = 1
|
||||||
url = http://minecraft.net/
|
url = http://minecraft.net/
|
||||||
install = minecraft-server.install
|
install = minecraft-server.install
|
||||||
arch = any
|
arch = any
|
||||||
|
@ -14,19 +14,19 @@ pkgbase = minecraft-server
|
||||||
optdepends = netcat: required in order to suspend an idle server
|
optdepends = netcat: required in order to suspend an idle 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.4.jar
|
||||||
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.4/minecraft_server.1.9.4.jar
|
||||||
source = minecraftd-backup.service
|
source = minecraftd-backup.service
|
||||||
source = minecraftd-backup.timer
|
source = minecraftd-backup.timer
|
||||||
source = minecraftd.service
|
source = minecraftd.service
|
||||||
source = minecraftd.conf
|
source = minecraftd.conf
|
||||||
source = minecraftd.sh
|
source = minecraftd.sh
|
||||||
md5sums = 560d467028f17a70997151ed0053deb6
|
md5sums = 292feb3085809e714da2ca75514b9d5b
|
||||||
md5sums = b786935d6517d46fe0944377daba32b8
|
md5sums = b786935d6517d46fe0944377daba32b8
|
||||||
md5sums = fef6fadd0739ae03ff71ba61025be207
|
md5sums = fef6fadd0739ae03ff71ba61025be207
|
||||||
md5sums = afb84ad0316af0aca421b36eaa2bbd90
|
md5sums = afb84ad0316af0aca421b36eaa2bbd90
|
||||||
md5sums = 00045683c06924d765ac14887218ffcc
|
md5sums = 00045683c06924d765ac14887218ffcc
|
||||||
md5sums = 1f31f0e0ee859ed43b512121b61edc69
|
md5sums = ae1a827fe7fa5ff62b1b5627d6850c82
|
||||||
|
|
||||||
pkgname = minecraft-server
|
pkgname = minecraft-server
|
||||||
|
|
8
PKGBUILD
8
PKGBUILD
|
@ -3,8 +3,8 @@
|
||||||
# Contributer: sowieso <sowieso@dukun.de>
|
# Contributer: sowieso <sowieso@dukun.de>
|
||||||
|
|
||||||
pkgname=minecraft-server
|
pkgname=minecraft-server
|
||||||
pkgver=1.9.2
|
pkgver=1.9.4
|
||||||
pkgrel=4
|
pkgrel=1
|
||||||
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/"
|
||||||
|
@ -22,12 +22,12 @@ source=("https://s3.amazonaws.com/Minecraft.Download/versions/${pkgver}/minecraf
|
||||||
"minecraftd.conf"
|
"minecraftd.conf"
|
||||||
"minecraftd.sh")
|
"minecraftd.sh")
|
||||||
noextract=("minecraft_server.${pkgver}.jar")
|
noextract=("minecraft_server.${pkgver}.jar")
|
||||||
md5sums=('560d467028f17a70997151ed0053deb6'
|
md5sums=('292feb3085809e714da2ca75514b9d5b'
|
||||||
'b786935d6517d46fe0944377daba32b8'
|
'b786935d6517d46fe0944377daba32b8'
|
||||||
'fef6fadd0739ae03ff71ba61025be207'
|
'fef6fadd0739ae03ff71ba61025be207'
|
||||||
'afb84ad0316af0aca421b36eaa2bbd90'
|
'afb84ad0316af0aca421b36eaa2bbd90'
|
||||||
'00045683c06924d765ac14887218ffcc'
|
'00045683c06924d765ac14887218ffcc'
|
||||||
'1f31f0e0ee859ed43b512121b61edc69')
|
'ae1a827fe7fa5ff62b1b5627d6850c82')
|
||||||
|
|
||||||
_game="minecraft"
|
_game="minecraft"
|
||||||
_server_root="/srv/minecraft"
|
_server_root="/srv/minecraft"
|
||||||
|
|
|
@ -100,8 +100,8 @@ 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
|
||||||
# Reset timer
|
# Reset timer and give the player 300 seconds to connect after pinging
|
||||||
no_player=0
|
no_player=$(( IDLE_IF_TIME - 300 ))
|
||||||
# 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}
|
||||||
|
@ -109,11 +109,12 @@ idle_server_daemon() {
|
||||||
IDLE_SERVER="false" ${myname} start
|
IDLE_SERVER="false" ${myname} start
|
||||||
fi
|
fi
|
||||||
elif [[ $? -eq 0 ]]; then
|
elif [[ $? -eq 0 ]]; then
|
||||||
|
# Reset timer since there is an active player on the server
|
||||||
no_player=0
|
no_player=0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Reset timer
|
# Reset timer and give the player 300 seconds to connect after pinging
|
||||||
no_player=0
|
no_player=$(( IDLE_IF_TIME - 300 ))
|
||||||
# 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}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user