upgpkg: minecraft-server 1.13.2-2
Update server-management script to be a little tidier. Sync changes across minecraft-server, spigot and cuberite. upgpkg: cuberite 1.12b1013-2 upgpkg: spigot 1.13.2+b93-1
This commit is contained in:
		
							parent
							
								
									1a70074f12
								
							
						
					
					
						commit
						fc300f4fd6
					
				
							
								
								
									
										4
									
								
								.SRCINFO
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								.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.13.2
 | 
						pkgver = 1.13.2
 | 
				
			||||||
	pkgrel = 1
 | 
						pkgrel = 2
 | 
				
			||||||
	url = https://minecraft.net/
 | 
						url = https://minecraft.net/
 | 
				
			||||||
	install = minecraft-server.install
 | 
						install = minecraft-server.install
 | 
				
			||||||
	arch = any
 | 
						arch = any
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,6 @@ pkgbase = minecraft-server
 | 
				
			||||||
	sha512sums = 19ee3646bfbace353b65c0373594edb654de11c9671f29cebad3b31109f29f94ade1d529d9f409b0989c376bef9b451585b22a1e0ac4295fcc92d9565f808418
 | 
						sha512sums = 19ee3646bfbace353b65c0373594edb654de11c9671f29cebad3b31109f29f94ade1d529d9f409b0989c376bef9b451585b22a1e0ac4295fcc92d9565f808418
 | 
				
			||||||
	sha512sums = 5203f6331f740ecfcea2a2cc653603ae97419baa89e08512f9d8feb63e4a52978442a69b313eccd9037b676a62ab528e2b533c0fb95a9c7177318279fe0cde79
 | 
						sha512sums = 5203f6331f740ecfcea2a2cc653603ae97419baa89e08512f9d8feb63e4a52978442a69b313eccd9037b676a62ab528e2b533c0fb95a9c7177318279fe0cde79
 | 
				
			||||||
	sha512sums = 73132ec613e05c8ed7ebe4eda2395f1ea0733ffe94ba7e203e06246d5852139bbfb7a9073b2b01891282339a2f85676699cd889cde79d6317066e27fd65b1d67
 | 
						sha512sums = 73132ec613e05c8ed7ebe4eda2395f1ea0733ffe94ba7e203e06246d5852139bbfb7a9073b2b01891282339a2f85676699cd889cde79d6317066e27fd65b1d67
 | 
				
			||||||
	sha512sums = e52d87c381c490e21bad955f9a041a0e3677fc831b191a12297f36bba56fe5e31f0a1854cc36c464ed8d54535ec4c8f0f524a9fd757f2141fa0e7bb268f5b247
 | 
						sha512sums = 0c7a3f96cff73d164a77d8eaca5848e39063c3e82f146e927cf950f2d934b17672fe7e4eb7612af48d10372658a81ccc41deab176fd373950561bd711ec85dfe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pkgname = minecraft-server
 | 
					pkgname = minecraft-server
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								PKGBUILD
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								PKGBUILD
									
									
									
									
									
								
							| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
pkgname=minecraft-server
 | 
					pkgname=minecraft-server
 | 
				
			||||||
pkgver=1.13.2
 | 
					pkgver=1.13.2
 | 
				
			||||||
_nonce=3737db93722a9e39eeada7c27e7aca28b144ffa7
 | 
					_nonce=3737db93722a9e39eeada7c27e7aca28b144ffa7
 | 
				
			||||||
pkgrel=1
 | 
					pkgrel=2
 | 
				
			||||||
pkgdesc="Minecraft server unit files, script, and jar"
 | 
					pkgdesc="Minecraft server unit files, script, and jar"
 | 
				
			||||||
arch=('any')
 | 
					arch=('any')
 | 
				
			||||||
url="https://minecraft.net/"
 | 
					url="https://minecraft.net/"
 | 
				
			||||||
| 
						 | 
					@ -28,7 +28,7 @@ sha512sums=('c9a98f1d224519369d6c4882cfe93a94983661c0c0b8a7f0b2f271af752fde56930
 | 
				
			||||||
            '19ee3646bfbace353b65c0373594edb654de11c9671f29cebad3b31109f29f94ade1d529d9f409b0989c376bef9b451585b22a1e0ac4295fcc92d9565f808418'
 | 
					            '19ee3646bfbace353b65c0373594edb654de11c9671f29cebad3b31109f29f94ade1d529d9f409b0989c376bef9b451585b22a1e0ac4295fcc92d9565f808418'
 | 
				
			||||||
            '5203f6331f740ecfcea2a2cc653603ae97419baa89e08512f9d8feb63e4a52978442a69b313eccd9037b676a62ab528e2b533c0fb95a9c7177318279fe0cde79'
 | 
					            '5203f6331f740ecfcea2a2cc653603ae97419baa89e08512f9d8feb63e4a52978442a69b313eccd9037b676a62ab528e2b533c0fb95a9c7177318279fe0cde79'
 | 
				
			||||||
            '73132ec613e05c8ed7ebe4eda2395f1ea0733ffe94ba7e203e06246d5852139bbfb7a9073b2b01891282339a2f85676699cd889cde79d6317066e27fd65b1d67'
 | 
					            '73132ec613e05c8ed7ebe4eda2395f1ea0733ffe94ba7e203e06246d5852139bbfb7a9073b2b01891282339a2f85676699cd889cde79d6317066e27fd65b1d67'
 | 
				
			||||||
            'e52d87c381c490e21bad955f9a041a0e3677fc831b191a12297f36bba56fe5e31f0a1854cc36c464ed8d54535ec4c8f0f524a9fd757f2141fa0e7bb268f5b247')
 | 
					            '0c7a3f96cff73d164a77d8eaca5848e39063c3e82f146e927cf950f2d934b17672fe7e4eb7612af48d10372658a81ccc41deab176fd373950561bd711ec85dfe')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_game="minecraft"
 | 
					_game="minecraft"
 | 
				
			||||||
_server_root="/srv/minecraft"
 | 
					_server_root="/srv/minecraft"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,32 +9,32 @@ declare -r game="minecraft"
 | 
				
			||||||
# Avoid altering any of those later in the code since they may be readonly (IDLE_SERVER is an exception!)
 | 
					# Avoid altering any of those later in the code since they may be readonly (IDLE_SERVER is an exception!)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# You may use this script for any game server of your choice, just alter the config file
 | 
					# You may use this script for any game server of your choice, just alter the config file
 | 
				
			||||||
[[ ! -z "${SERVER_ROOT}" ]]  && declare -r SERVER_ROOT=${SERVER_ROOT}   || SERVER_ROOT="/srv/${game}"
 | 
					[[ -n "${SERVER_ROOT}" ]]  && declare -r SERVER_ROOT=${SERVER_ROOT}   || SERVER_ROOT="/srv/${game}"
 | 
				
			||||||
[[ ! -z "${BACKUP_DEST}" ]]  && declare -r BACKUP_DEST=${BACKUP_DEST}   || BACKUP_DEST="/srv/${game}/backup"
 | 
					[[ -n "${BACKUP_DEST}" ]]  && declare -r BACKUP_DEST=${BACKUP_DEST}   || BACKUP_DEST="/srv/${game}/backup"
 | 
				
			||||||
[[ ! -z "${BACKUP_PATHS}" ]] && declare -r BACKUP_PATHS=${BACKUP_PATHS} || BACKUP_PATHS="world"
 | 
					[[ -n "${BACKUP_PATHS}" ]] && declare -r BACKUP_PATHS=${BACKUP_PATHS} || BACKUP_PATHS="world"
 | 
				
			||||||
[[ ! -z "${KEEP_BACKUPS}" ]] && declare -r KEEP_BACKUPS=${KEEP_BACKUPS} || KEEP_BACKUPS="10"
 | 
					[[ -n "${KEEP_BACKUPS}" ]] && declare -r KEEP_BACKUPS=${KEEP_BACKUPS} || KEEP_BACKUPS="10"
 | 
				
			||||||
[[ ! -z "${GAME_USER}" ]]    && declare -r GAME_USER=${GAME_USER}       || GAME_USER="minecraft"
 | 
					[[ -n "${GAME_USER}" ]]    && declare -r GAME_USER=${GAME_USER}       || GAME_USER="minecraft"
 | 
				
			||||||
[[ ! -z "${MAIN_EXECUTABLE}" ]] && declare -r MAIN_EXECUTABLE=${MAIN_EXECUTABLE} || MAIN_EXECUTABLE="minecraft_server.jar"
 | 
					[[ -n "${MAIN_EXECUTABLE}" ]] && declare -r MAIN_EXECUTABLE=${MAIN_EXECUTABLE} || MAIN_EXECUTABLE="minecraft_server.jar"
 | 
				
			||||||
[[ ! -z "${SESSION_NAME}" ]] && declare -r SESSION_NAME=${SESSION_NAME} || SESSION_NAME="${game}"
 | 
					[[ -n "${SESSION_NAME}" ]] && declare -r SESSION_NAME=${SESSION_NAME} || SESSION_NAME="${game}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Command and parameter declaration with which to start the server
 | 
					# Command and parameter declaration with which to start the server
 | 
				
			||||||
[[ ! -z "${SERVER_START_CMD}" ]] && declare -r SERVER_START_CMD=${SERVER_START_CMD} || SERVER_START_CMD="java -Xms512M -Xmx1024M -XX:ParallelGCThreads=1 -jar './${MAIN_EXECUTABLE}' nogui"
 | 
					[[ -n "${SERVER_START_CMD}" ]] && declare -r SERVER_START_CMD=${SERVER_START_CMD} || SERVER_START_CMD="java -Xms512M -Xmx1024M -XX:ParallelGCThreads=1 -jar './${MAIN_EXECUTABLE}' nogui"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# System parameters for the control script
 | 
					# System parameters for the control script
 | 
				
			||||||
[[ ! -z "${IDLE_SERVER}" ]]       && tmp_IDLE_SERVER=${IDLE_SERVER}   || IDLE_SERVER="false"
 | 
					[[ -n "${IDLE_SERVER}" ]]       && tmp_IDLE_SERVER=${IDLE_SERVER}   || IDLE_SERVER="false"
 | 
				
			||||||
[[ ! -z "${IDLE_SESSION_NAME}" ]] && declare -r IDLE_SESSION_NAME=${IDLE_SESSION_NAME} || IDLE_SESSION_NAME="idle_server_${SESSION_NAME}"
 | 
					[[ -n "${IDLE_SESSION_NAME}" ]] && declare -r IDLE_SESSION_NAME=${IDLE_SESSION_NAME} || IDLE_SESSION_NAME="idle_server_${SESSION_NAME}"
 | 
				
			||||||
[[ ! -z "${GAME_PORT}" ]]         && declare -r GAME_PORT=${GAME_PORT}       || GAME_PORT="25565"
 | 
					[[ -n "${GAME_PORT}" ]]         && declare -r GAME_PORT=${GAME_PORT}       || GAME_PORT="25565"
 | 
				
			||||||
[[ ! -z "${CHECK_PLAYER_TIME}" ]] && declare -r CHECK_PLAYER_TIME=${CHECK_PLAYER_TIME} || CHECK_PLAYER_TIME="30"
 | 
					[[ -n "${CHECK_PLAYER_TIME}" ]] && declare -r CHECK_PLAYER_TIME=${CHECK_PLAYER_TIME} || CHECK_PLAYER_TIME="30"
 | 
				
			||||||
[[ ! -z "${IDLE_IF_TIME}" ]]      && declare -r IDLE_IF_TIME=${IDLE_IF_TIME} || IDLE_IF_TIME="1200"
 | 
					[[ -n "${IDLE_IF_TIME}" ]]      && declare -r IDLE_IF_TIME=${IDLE_IF_TIME} || IDLE_IF_TIME="1200"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Additional configuration options which only few may need to alter
 | 
					# Additional configuration options which only few may need to alter
 | 
				
			||||||
[[ ! -z "${GAME_COMMAND_DUMP}" ]] && declare -r GAME_COMMAND_DUMP=${GAME_COMMAND_DUMP} || GAME_COMMAND_DUMP="/tmp/${myname}_${SESSION_NAME}_command_dump.txt"
 | 
					[[ -n "${GAME_COMMAND_DUMP}" ]] && declare -r GAME_COMMAND_DUMP=${GAME_COMMAND_DUMP} || GAME_COMMAND_DUMP="/tmp/${myname}_${SESSION_NAME}_command_dump.txt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Variables passed over the command line will always override the one from a config file
 | 
					# Variables passed over the command line will always override the one from a config file
 | 
				
			||||||
source /etc/conf.d/"${game}" 2>/dev/null || >&2 echo "Could not source /etc/conf.d/${game}"
 | 
					source /etc/conf.d/"${game}" 2>/dev/null || >&2 echo "Could not source /etc/conf.d/${game}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Preserve the content of IDLE_SERVER without making it readonly
 | 
					# Preserve the content of IDLE_SERVER without making it readonly
 | 
				
			||||||
[[ ! -z ${tmp_IDLE_SERVER} ]] && IDLE_SERVER=${tmp_IDLE_SERVER}
 | 
					[[ -n ${tmp_IDLE_SERVER} ]] && IDLE_SERVER=${tmp_IDLE_SERVER}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Strictly disallow uninitialized Variables
 | 
					# Strictly disallow uninitialized Variables
 | 
				
			||||||
| 
						 | 
					@ -50,9 +50,9 @@ else
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Choose which flavor of netcat is to be used
 | 
					# Choose which flavor of netcat is to be used
 | 
				
			||||||
if which netcat &> /dev/null; then
 | 
					if command -vnetcat &> /dev/null; then
 | 
				
			||||||
	NETCAT_CMD="netcat"
 | 
						NETCAT_CMD="netcat"
 | 
				
			||||||
elif which ncat &> /dev/null; then
 | 
					elif command -vncat &> /dev/null; then
 | 
				
			||||||
	NETCAT_CMD="ncat"
 | 
						NETCAT_CMD="ncat"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	NETCAT_CMD=""
 | 
						NETCAT_CMD=""
 | 
				
			||||||
| 
						 | 
					@ -293,7 +293,7 @@ server_restart() {
 | 
				
			||||||
# Backup the directories specified in BACKUP_PATHS
 | 
					# Backup the directories specified in BACKUP_PATHS
 | 
				
			||||||
backup_files() {
 | 
					backup_files() {
 | 
				
			||||||
	# Check for the availability of the tar binaries
 | 
						# Check for the availability of the tar binaries
 | 
				
			||||||
	if ! which tar &> /dev/null; then
 | 
						if ! command -vtar &> /dev/null; then
 | 
				
			||||||
		>&2 echo "The tar binaries are needed for a backup."
 | 
							>&2 echo "The tar binaries are needed for a backup."
 | 
				
			||||||
		exit 11
 | 
							exit 11
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
| 
						 | 
					@ -327,7 +327,7 @@ backup_files() {
 | 
				
			||||||
# Restore backup
 | 
					# Restore backup
 | 
				
			||||||
backup_restore() {
 | 
					backup_restore() {
 | 
				
			||||||
	# Check for the availability of the tar binaries
 | 
						# Check for the availability of the tar binaries
 | 
				
			||||||
	if ! which tar &> /dev/null; then
 | 
						if ! command -vtar &> /dev/null; then
 | 
				
			||||||
		>&2 echo "The tar binaries are needed for a backup."
 | 
							>&2 echo "The tar binaries are needed for a backup."
 | 
				
			||||||
		exit 11
 | 
							exit 11
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user