Integration with UCS/Join

From Univention Wiki

Revision as of 22:25, 17 October 2016 by Wiesenthal (talk | contribs) (Created page with "Category:App Center Developer Guide The join script is a fundamental feature of UCS. UCS is used to run and administrate a domain. New computers may "join" the do...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The join script is a fundamental feature of UCS. UCS is used to run and administrate a domain. New computers may "join" the domain. The computer searches for the Domain Controller Master (DC Master) and adds itself to LDAP (hostname, IP address, etc). Join scripts are used to "join software packages" into the domain. This means that if you install your App, it may need to register important bits somewhere and make some changes in the domain.

The domain is administrated by manipulating the core database on the DC Master, the LDAP database. Normally, this is done by using tools provided by Univention, mainly the Univention Directory Manager (UDM).

For App Providers, a Join Script functions as a postinst of the App. But it has write access to the LDAP database (even when not installed on the DC Master).

Important
Join scripts that fail to run through do not abort the installation. Instead, administrators are notified that a join script has not yet been executed.
Important
Output of the Join scripts goes to /var/log/univention/join.log on the Docker Host.

Example Join script

#!/bin/sh
VERSION=1
. /usr/share/univention-appcenter/joinscripthelper.sh
joinscript_init
eval "$(ucr shell ldap/base)"

joinscript_run_in_container sed -i /opt/myapp/some_script ... || die

joinscript_save_current_version
exit 0

Join Script Helper

TBD

Best practices

TBD; status, || die

Personal tools