mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
feat(collabora): expose env options and persist config
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user