mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
14 lines
677 B
Bash
14 lines
677 B
Bash
#!/usr/bin/env bash
|
|
|
|
# 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; }
|
|
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"
|
|
[ -f "${theming_base_path}/logo" ] || cp /usr/local/etc/logo "${theming_base_path}/logo"
|
|
[ -f "${theming_base_path}/logoheader" ] || cp /usr/local/etc/logo "${theming_base_path}/logoheader"
|
|
chown -R www-data:www-data "data/appdata_${ID}"
|
|
}
|