summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordian Edenhofer2016-03-13 22:07:58 +0100
committerGordian Edenhofer2016-03-14 21:23:18 +0100
commit57c082bbbd2ef83dd032816606508e8e7a2c5504 (patch)
tree5cbc69226503605b43dc70327243df817ee289e7
parent8cba93614494584dae9b0c06ee563dbc6c69c985 (diff)
downloadaur-57c082bbbd2ef83dd032816606508e8e7a2c5504.tar.gz
Upgpkg: 1.9-6
Renaming variables in the configuration file. Increase time-out time to 10 seconds when shutting down the idle_server. Minor redesign when passing commands to the minecraft server console.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--minecraftd.conf8
-rwxr-xr-xminecraftd.sh20
4 files changed, 18 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5b548019081..7d8de8f2af9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -27,7 +27,7 @@ pkgbase = minecraft-server
md5sums = b786935d6517d46fe0944377daba32b8
md5sums = fef6fadd0739ae03ff71ba61025be207
md5sums = afb84ad0316af0aca421b36eaa2bbd90
- md5sums = 54438e0c47cc5083e0a4376688b46092
- md5sums = 98fe0fdfe4021a522739e3e14601ad9f
+ md5sums = 00045683c06924d765ac14887218ffcc
+ md5sums = 18f23e5ad6547e6110a407808de40332
pkgname = minecraft-server
diff --git a/PKGBUILD b/PKGBUILD
index b5b55bf8979..96dae569851 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,8 +27,8 @@ md5sums=('ff68834eee875bcf367422c67673207c'
'b786935d6517d46fe0944377daba32b8'
'fef6fadd0739ae03ff71ba61025be207'
'afb84ad0316af0aca421b36eaa2bbd90'
- '54438e0c47cc5083e0a4376688b46092'
- '98fe0fdfe4021a522739e3e14601ad9f')
+ '00045683c06924d765ac14887218ffcc'
+ '18f23e5ad6547e6110a407808de40332')
_game="minecraft"
_server_root="/srv/minecraft"
diff --git a/minecraftd.conf b/minecraftd.conf
index 40f1aec42ed..1c59ab401b1 100644
--- a/minecraftd.conf
+++ b/minecraftd.conf
@@ -3,12 +3,12 @@
# General parameters
SERVER_ROOT="/srv/minecraft"
-BACKUPPATH="/srv/minecraft/backup"
+BACKUP_DEST="/srv/minecraft/backup"
LOGPATH="/srv/minecraft/logs"
-WORLDPATHS="world" # World paths separated by spaces relative to SERVER_ROOT
+BACKUP_PATHS="world" # World paths separated by spaces relative to SERVER_ROOT
KEEP_BACKUPS="10"
-MC_USER="minecraft"
-MAIN_JAR="minecraft_server.jar"
+GAME_USER="minecraft"
+MAIN_EXECUTABLE="minecraft_server.jar"
SESSION_NAME="minecraft"
# System parameters for java
diff --git a/minecraftd.sh b/minecraftd.sh
index 43e5d40dd08..56ef155b4f7 100755
--- a/minecraftd.sh
+++ b/minecraftd.sh
@@ -93,10 +93,10 @@ idle_server_daemon() {
if [[ "${no_player}" -ge "${IDLE_IF_TIME}" ]]; then
IDLE_SERVER="false" ${myname} stop
# Wait for game server to go down
- for i in {1..90}; do
+ for i in {1..100}; do
screen -S "${SESSION_NAME}" -Q select . > /dev/null
[[ $? -eq 1 ]] && break
- [[ $i -eq 90 ]] && echo -e "\e[39;1m An error occured while trying to reset the idle_server! \e[0m"
+ [[ $i -eq 100 ]] && echo -e "An \e[39;1merror\e[0m occured while trying to reset the idle_server!"
sleep 0.1
done
# Listen on port ${GAME_PORT} for incoming connections
@@ -142,10 +142,10 @@ server_start() {
if [[ $? -eq 0 ]]; then
${SUDO_CMD} screen -S "${IDLE_SESSION_NAME}" -X quit
# Restart as soon as the idle_server_daemon has shut down completely
- for i in {1..30}; do
+ for i in {1..100}; do
${SUDO_CMD} screen -S "${IDLE_SESSION_NAME}" -Q select . > /dev/null
[[ $? -eq 1 ]] && ${SUDO_CMD} screen -dmS "${IDLE_SESSION_NAME}" /bin/bash -c "${myname} idle_server_daemon" && break
- [[ $i -eq 30 ]] && echo -e "\e[39;1m An error occured while trying to reset the idle_server! \e[0m"
+ [[ $i -eq 100 ]] && echo -e "An \e[39;1merror\e[0m occured while trying to reset the idle_server!"
sleep 0.1
done
else
@@ -182,7 +182,7 @@ server_stop() {
game_command save-all
game_command say "Server is going down in 10 seconds! HURRY UP WITH WHATEVER YOU ARE DOING!" # Warning the users
echo -en "Server is going down in... "
- for i in $(seq 1 10); do
+ for i in {1..10}; do
game_command say "down in... $(expr 10 - $i)"
echo -n " $(expr 10 - $i)"
sleep 1
@@ -190,10 +190,10 @@ server_stop() {
game_command stop
# Finish as soon as the server has shut down completely
- for i in {1..30}; do
+ for i in {1..100}; do
${SUDO_CMD} screen -S "${SESSION_NAME}" -Q select . > /dev/null
[[ $? -eq 1 ]] && echo -e "\e[39;1m done\e[0m" && break
- [[ $i -eq 30 ]] && echo -e "\e[39;1m ERROR\e[0m"
+ [[ $i -eq 100 ]] && echo -e "\e[39;1m timed out\e[0m"
sleep 0.1
done
else
@@ -358,10 +358,10 @@ server_command() {
${SUDO_CMD} screen -S "${SESSION_NAME}" -Q select . > /dev/null
if [[ $? -eq 0 ]]; then
- sleep 0.2s &
+ sleep 0.2 &
sleep_pid=$!
- game_command "$@" &
- tail -f --pid=${sleep_pid} -n 0 "${LOGPATH}/latest.log"
+ game_command "$@"
+ ${SUDO_CMD} tail -f --pid=${sleep_pid} -n 0 "${LOGPATH}/latest.log"
else
echo "There is no ${SESSION_NAME} session to connect to."
fi