From 34b0a09ed6c5906d063acd7784604f3fb59ccfac Mon Sep 17 00:00:00 2001 From: LarsBel <39060393+LarsBel@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:56:46 +0100 Subject: [PATCH] fixed order error --- cli/upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/upgrade.sh b/cli/upgrade.sh index 14c99515b..cf0eeb5e4 100755 --- a/cli/upgrade.sh +++ b/cli/upgrade.sh @@ -12,6 +12,7 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" LATEST_URL="https://snappymail.eu/repository/latest.tar.gz" +cd "${SCRIPT_DIR}" OWNERGROUP=`stat -c "%U:%G" snappymail` OLD_VERSION=`grep "define('APP_VERSION" index.php | awk -F\' '{print $4}'` @@ -19,7 +20,6 @@ OLD_VERSION=`grep "define('APP_VERSION" index.php | awk -F\' '{print $4}'` if [[ $(id -u) -ne 0 ]] ; then echo -e "\033[1;31mPlease run as root\033[0m" ; exit 1 ; fi # check if we are in the correct dir -cd "${SCRIPT_DIR}" if [ ! -d snappymail/v ] ; then echo -e "\033[1;31mThis script can only be run from the SnappyMail install directory\033[0m" ; exit 1 ; fi # Download last release to /tmp