1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 10:45:15 +03:00
aports/community/nextcloud/nextcloud.pre-upgrade
Jakub Jirutka 56340e0c37 community/nextcloud: move bundled apps to /usr/share
It's totally wrong to install pkg's files into /var/lib and make them
writable by webserver! Moreover when Nextcloud supports multiple
app paths.

So we use two apps locations:
* /usr/share/webapps/nextcloud/apps - for apps installed by apk,
* /var/lib/nextcloud/apps - for apps installed from AppStore.

BTW Fedora uses the same approach.
2017-06-25 02:42:47 +02:00

10 lines
297 B
Bash

#!/bin/sh
ver_old="$2"
apps_link='/usr/share/webapps/nextcloud/apps'
# Remove apps symlink before replacing files to avoid losing installed apps.
# This is a workaround for some issue in apk.
if [ $(apk version -t "$ver_old" '12.0.0-r2') = '<' ] && [ -L "$apps_link" ]; then
rm "$apps_link"
fi