Hi,
there is a generic way to modify any configuration file in the /opt/open-xchange/etc directory via UCR variables. These UCR variables can be set during the package installation, via command line or the UMC web interface. The variables consist of a prefix “ox/cfg”, the name of the configuration file in the “/opt/open-xchange/etc” directory, a property and a value for the property:
-> ucr set ox/cfg/CONFIG_FILENAME/PROPERTY=VALUE
Example:
-> more /opt/open-xchange/etc/permissions.properties| grep permissio
# Default permissions for all users
permissions=
-> ucr set ox/cfg/permissions.properties/permissions=myplugin
-> more /opt/open-xchange/etc/permissions.properties| grep permissio
# Default permissions for all users
# Warning: the value "permissions" has been set via UCR variable "ox/cfg/permissions.properties/permissions" - please alter the UCR variable instead
permissions=myplugin
More information on how to set, unset, get UCR variables can be found in the developer reference docs.univention.de/developer-ref … sage:shell
The integration packages of apps normally handle this kind of configuration in the debian/postinst script of the package, e.g.
#!/bin/bash
#DEBHELPER#
if [ "$1" = "configure" ]; then
module=myplugin
# get the current value
permissions="$(ucr get ox/cfg/permissions.properties/permissions)"
# check if module is already set
if [[ "$permissions" == *"${module}"* ]] ; then
echo "OX permission '$module' already set"
else
echo "Adding OX permission '$module'"
# "${foo:+,}" evaluates to "," if variable foo is non-empty
ucr set ox/cfg/permissions.properties/permissions="$(echo "${permissions}${permissions:+,}$module")"
fi
... more configuration ...
# restart open-xchange
[ -x "/etc/init.d/open-xchange" ] && invoke-rc.d open-xchange restart
fi
Best regards,
Felix Botner