This bash script allows you to use your YunoHost accounts in Mattermost on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.
The Mattermost Team Edition does not include a native LDAP feature. This subject is discussed here.
Fortunately, GitHub user Crivaledaz developed a module that uses the Gitlab SSO feature to provide a bridge between YunoHost users and Mattermost TE.
This bash script allows automatic integration of this module into an existing YunoHost environment.
It installs a new Custom Webapp for YunoHost that will be the OAuth servern and then follows the module installation instructions, doing just a few minor modifications.
This script should adapt to your YunoHost environment, but it has only been tested successfully on ONE YunoHost 11.1 installation, and without the benefit of hindsight : it may not be ready for a critical production environment. Use at your own risks.