From c81480ae94bd8a4e01e60e59c3e71fabdd7651d7 Mon Sep 17 00:00:00 2001 From: mreid-tt <943378+mreid-tt@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:12:46 -0400 Subject: [PATCH] Amend service setup script --- spk/wallabag/src/service-setup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spk/wallabag/src/service-setup.sh b/spk/wallabag/src/service-setup.sh index 01691c2bef0..f3e9720af2f 100644 --- a/spk/wallabag/src/service-setup.sh +++ b/spk/wallabag/src/service-setup.sh @@ -267,6 +267,9 @@ service_preuninst () echo "Copying previous configuration and data from ${WEB_ROOT}" ${MKDIR} "${TEMPDIR}/config" rsync -aX "${CFG_FILE}" "${TEMPDIR}/config/" 2>&1 + if [ -f ${IDX_FILE} ]; then + rsync -aX "${IDX_FILE}" "${TEMPDIR}/config/" 2>&1 + fi if [ -d ${WEB_ROOT}/web/assets/images ]; then rsync -aX "${WEB_ROOT}/web/assets/images" "${TEMPDIR}/" 2>&1 fi @@ -370,11 +373,6 @@ service_restore () fi ${RM} ${SYNOPKG_TEMP_UPGRADE_FOLDER}/${SYNOPKG_PKGNAME} - # Fix permissions - if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then - chown -R ${WEB_USER}:${WEB_GROUP} ${WEB_ROOT}/upload - fi - # migrate database if ! exec_php ${WEB_ROOT}/bin/console doctrine:migrations:migrate --env=prod -n -vvv > ${WEB_ROOT}/migration.log 2>&1; then echo "Unable to migrate database schema. Please check the log: ${WEB_ROOT}/migration.log"