|
@ -13,9 +13,23 @@ |
|
|
|
|
|
|
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
if ! [ -e "$SERVICE_CONFIGSTORE/etc/onlyoffice/documentserver/local.json" ]; then |
|
|
|
|
|
|
|
|
image_id=$(service_base_image_id "$SERVICE_NAME") || { |
|
|
|
|
|
err "couldn't get image id of $SERVICE_NAME." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CONTROL_FILE="$SERVICE_CONFIGSTORE/etc/onlyoffice/.image_id" |
|
|
|
|
|
if [ "$(cat "$CONTROL_FILE")" != "$image_id" ]; then |
|
|
## first time we need to extract configuration from image |
|
|
## first time we need to extract configuration from image |
|
|
|
|
|
rm -rf "$SERVICE_CONFIGSTORE/etc/onlyoffice" |
|
|
mkdir -p "$SERVICE_CONFIGSTORE/etc/onlyoffice" |
|
|
mkdir -p "$SERVICE_CONFIGSTORE/etc/onlyoffice" |
|
|
service_base_image_export_dir "$SERVICE_NAME" /etc/onlyoffice/documentserver "$SERVICE_CONFIGSTORE/etc/onlyoffice/" |
|
|
service_base_image_export_dir "$SERVICE_NAME" /etc/onlyoffice/documentserver "$SERVICE_CONFIGSTORE/etc/onlyoffice/" |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf "%s" "$image_id" > "$CONTROL_FILE" |
|
|
|
|
|
else |
|
|
|
|
|
## probably not needed to regenerate fonts |
|
|
|
|
|
init-config-add "\ |
|
|
|
|
|
$MASTER_BASE_SERVICE_NAME: |
|
|
|
|
|
environment: |
|
|
|
|
|
GENERATE_FONTS: \"false\" |
|
|
|
|
|
" |
|
|
|
|
|
fi |