Skip to content

Commit

Permalink
Amend service setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
mreid-tt committed Sep 18, 2024
1 parent 38ccb02 commit c81480a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spk/wallabag/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit c81480a

Please sign in to comment.