diff --git a/update_nextcloud.sh b/update_nextcloud.sh index 523b28a..61be1d1 100755 --- a/update_nextcloud.sh +++ b/update_nextcloud.sh @@ -407,14 +407,10 @@ source ${snippet_dir}/get-path-of-php-command.sh 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="$(sudo -u $HTTP_USER ${PHP_BIN} ${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)" - -DATA_DIR=${WEB_BASE_DIR}/data -OLD_DATA_DIR=${WEB_BASE_DIR}/data-${PRIOR_VERSION} +DATA_DIR="$(realpath "${WEB_BASE_DIR}/data")" +OLD_DATA_DIR="$(dirname "${DATA_DIR}")/data-${PRIOR_VERSION}.${backup_date}" @@ -858,8 +854,8 @@ fi # - Backup Daten Verzeichnis (hardlinks - harte Dateiverweise) # - -echononl " Copy (hardlink) data directory to '${OLD_DATA_DIR}.$backup_date'.." -cp -al "${DATA_DIR}" "${OLD_DATA_DIR}.${backup_date}" > $log_file 2>&1 +echononl " Copy (hardlink) data directory to '${OLD_DATA_DIR}'.." +cp -al "${DATA_DIR}" "${OLD_DATA_DIR}" > $log_file 2>&1 if [[ $? -eq 0 ]]; then echo_ok else