From ff6b4a53ea6a7181d0422870dce0df2f9a53a5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 27 Feb 2023 02:27:55 +0100 Subject: [PATCH] Fix --redownload not restarting after successful download --- msman.cfg | 8 ++++---- msman.sh | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/msman.cfg b/msman.cfg index 6c079a2..7dd0c9e 100644 --- a/msman.cfg +++ b/msman.cfg @@ -1,7 +1,7 @@ -############################################################# -# Settings for start_papermc.sh script # -# Available at https://github.com/jiriks74/start_papermc.sh # -############################################################# +##################################################### +# Settings for start_papermc.sh script # +# Available at https://github.com/jiriks74/msman.sh # +##################################################### # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # This script is not made for migrating versions. # diff --git a/msman.sh b/msman.sh index 958c032..73aeff1 100755 --- a/msman.sh +++ b/msman.sh @@ -3,7 +3,7 @@ set -e ############################################################################################################# # MinecraftServerMANager # # by jiriks74 # -# https://github.com/jiriks74/start_papermc.sh # +# https://github.com/jiriks74/msman.sh # # This script is under GPLv3, if you want to distribute changes you have to do so under the same license # # and acknowledge the original script and author. # ############################################################################################################# @@ -317,7 +317,8 @@ function check_self_update { self_update CURRENT_VERSION=$LATEST_SCRIPT_VERSION check_helper_scripts - exec $0 + ScriptLoc=$(readlink -f "$0") + ./$ScriptLoc else echo "Skipping update." return @@ -464,7 +465,8 @@ if [[ "$1" == "--redownload" ]] || [[ "$1" == "-r" ]]; then get_latest_script_release self_update # Reload the script - exec $0 + ScriptLoc=$(readlink -f "$0") + ./$ScriptLoc exit 0 elif [[ "$1" == "--edit-config" ]] || [[ "$1" == "-e" ]]; then if ! command -v $EDITOR &> /dev/null; then