From 5a97b7c72537ed082da5407c9967169942889a2e Mon Sep 17 00:00:00 2001 From: Gordian Edenhofer Date: Thu, 13 Apr 2017 14:18:17 +0200 Subject: [PATCH] upgpkg: minecraft-server 1.11.2-4 Do not remove the user upon un-installation and do not stop the server prior to removal in order to conform with the Arch package standards. --- .SRCINFO | 2 +- PKGBUILD | 2 +- minecraft-server.install | 20 ++------------------ 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 4b5ab42..38c057b 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = minecraft-server pkgdesc = Minecraft server unit files, script, and jar pkgver = 1.11.2 - pkgrel = 3 + pkgrel = 4 url = https://minecraft.net/ install = minecraft-server.install arch = any diff --git a/PKGBUILD b/PKGBUILD index 4238d2b..8f6e0e6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgname=minecraft-server pkgver=1.11.2 -pkgrel=3 +pkgrel=4 pkgdesc="Minecraft server unit files, script, and jar" arch=('any') url="https://minecraft.net/" diff --git a/minecraft-server.install b/minecraft-server.install index e647b98..f6f9980 100644 --- a/minecraft-server.install +++ b/minecraft-server.install @@ -29,24 +29,8 @@ post_upgrade() { chown -R ${_user}:${_user} "${_server_root}" } -pre_remove() { - echo -e "\e[34;1m==>\e[39;1m Stopping and disabling ${_game}d... \e[0m" - systemctl stop ${_game}d.service - systemctl disable ${_game}d.service - - /usr/bin/${_game}d stop > /dev/null -} - post_remove() { # Notifying the user of kept dirs - [[ -d "${_server_root}" ]] && chown -R root:root "${_server_root}" && echo -e "\e[34;1m==>\e[39;1m NOTE: Game saves in ${_server_root} were kept on your system.\e[0m" - [[ -f "/etc/conf.d/${_game}" ]] && echo -e "\e[34;1m==>\e[39;1m NOTE: Your configuration file /etc/conf.d/${_game} was kept on your system.\e[0m" - - echo -e "\e[34;1m==>\e[39;1m Removing ${_user} system user and group... \e[0m" - if getent passwd ${_user} >/dev/null 2>&1; then - userdel ${_user} 2>/dev/null - fi - if getent group ${_user} >/dev/null 2>&1; then - groupdel ${_user} - fi + [[ -d "${_server_root}" ]] && echo -e "\e[34;1m==>\e[39;1m NOTE: Game saves in ${_server_root} were kept on your system.\e[0m" + echo -e "\e[34;1m==>\e[39;1m NOTE: The ${_user} user was preserved on your system. \e[0m" }