update_nextcloud.sh: use 'occ' to get current version of netxcloud installation.

This commit is contained in:
Christoph 2021-10-02 10:55:24 +02:00
parent b35cd9e1f5
commit 4f63d96338

View File

@ -478,7 +478,8 @@ fi
INSTALL_DIR="${WEB_BASE_DIR}/nextcloud-${VERSION}"
CURRENT_INSTALL_DIR="$(realpath ${WEB_BASE_DIR}/nextcloud)"
PRIOR_VERSION="$(basename $CURRENT_INSTALL_DIR | cut -d"-" -f2)"
#PRIOR_VERSION="$(basename $CURRENT_INSTALL_DIR | cut -d"-" -f2)"
PRIOR_VERSION="$(sudo -u $HTTP_USER /usr/local/php/bin/php ${WEB_BASE_DIR}/htdocs/occ --version | cut -d' ' -f2)"
DATA_DIR=${WEB_BASE_DIR}/data-${VERSION}
CURRENT_DATA_DIR="$(realpath ${WEB_BASE_DIR}/data-$PRIOR_VERSION)"