feat(collabora): expose env options and persist config

This commit is contained in:
Alexandre
2025-08-06 07:34:26 +02:00
parent 7c5bc2fedb
commit 15f65963e3
4 changed files with 42 additions and 2 deletions

View File

@@ -17,5 +17,33 @@ if bashio::config.has_value 'password'; then
export password
fi
if bashio::config.has_value 'aliasgroup1'; then
aliasgroup1="$(bashio::config 'aliasgroup1')"
export aliasgroup1
fi
if bashio::config.has_value 'dictionaries'; then
dictionaries="$(bashio::config 'dictionaries')"
export dictionaries
fi
if bashio::config.has_value 'extra_params'; then
extra_params="$(bashio::config 'extra_params')"
export extra_params
fi
COOL_CONFIG="/etc/coolwsd/coolwsd.xml"
CONFIG_DEST="/config/coolwsd.xml"
mkdir -p /config
if [ ! -e "${CONFIG_DEST}" ]; then
mv "${COOL_CONFIG}" "${CONFIG_DEST}"
chown root:root "${CONFIG_DEST}"
chmod 644 "${CONFIG_DEST}"
else
rm -f "${COOL_CONFIG}"
fi
ln -sf "${CONFIG_DEST}" "${COOL_CONFIG}"
bashio::log.info "Starting Collabora Online..."
su -s /bin/bash -c "/start-collabora-online.sh" "$(getent passwd 1001 | cut -d: -f1)"