1.51.1.sh: Fix retrieval of theming app instance ID

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2023-04-05 20:39:47 +02:00
parent 39549d2e6e
commit fd60a22b17
No known key found for this signature in database
GPG Key ID: 3510056072886A8F

View File

@ -2,8 +2,8 @@
# Fix NCP theme
[[ -e /usr/local/etc/logo ]] && {
ID=$( grep instanceid config/config.php | awk -F "=> " '{ print $2 }' | sed "s|[,']||g" )
[[ "$ID" == "" ]] && { echo "failed to get ID"; return 1; }
ID=$( grep instanceid /var/www/nextcloud/config/config.php | awk -F "=> " '{ print $2 }' | sed "s|[,']||g" )
[[ "$ID" == "" ]] && { echo "failed to get ID"; exit 1; }
theming_base_path="data/appdata_${ID}/theming/global/images"
mkdir -p "${theming_base_path}"
[ -f "${theming_base_path}/background" ] || cp /usr/local/etc/background "${theming_base_path}/background"