|
|
Line 1: |
Line 1: |
− | [[Category:App Center Developer Guide]] | + | #REDIRECT [[Settings]] |
| | | |
− | Apps may be configured from within the App Center module. These settings are closely related to Univention Configuration Registry (UCR).
| + | This page used to describe the .univention-config-registry-variable file integration. It has been placed by the the .settings file. |
− | | |
− | In UCS, UCR holds system wide information that can be accessed by scripts and used to write configuration files. See the [https://docs.software-univention.de/developer-reference.html#chap:ucr Developer Reference] for more details.
| |
− | | |
− | Apps may ship a .univention-config-registry-Variables file that contains a superset of what can be specified in UCS.
| |
− | | |
− | Example:
| |
− | | |
− | <pre>
| |
− | [myapp/verbose]
| |
− | Description[de]=Alles in Log-Dateien schreiben
| |
− | Description[en]=Write everything in log files
| |
− | Type=bool
| |
− | Advanced=yes
| |
− | Categories=apps
| |
− | | |
− | [myapp/rights/type]
| |
− | Description[de]=Rechtevergabe
| |
− | Description[en]=Access control
| |
− | Type=list
| |
− | Labels[de]="Alle lesen, eigene schreiben" "Alle lesen, alle schreiben"
| |
− | Labels[en]="Read all, write own" "Read all, write all"
| |
− | Values=owner_write authenticated
| |
− | Default=owner_write
| |
− | Categories=apps
| |
− | </pre>
| |
− | | |
− | The following attributes may be set: TBD
| |
− | | |
− | Inside the container, you may use ucr get variable to get the value. Variables that were set during installation are accessible as environment variables, too ([myapp/variable] becomes MYAPP_VARIABLE). Note that these were set during container creation. The environment variables will not change, even after the user changes the UCR variable.
| |
− | | |
− | ;''Note'': For the full functionality of UCR (e.g., UCR templates), you would need a UCS based image. If the App Center detects UCR is present (which ucr), it will use it to set the variables (docker exec $appcontainer ucr set variable1=value1 variable2=value2). If this program is not found, the variables still get written in /etc/univention/base.conf. You may parse this file if UCR is not available. The format is rather simple: Each line contains variable: value.
| |