maubot/abra.sh
2025-02-25 17:25:00 +01:00

16 lines
686 B
Bash

export MAUBOT_CONFIG_VERSION=v4
# takes an url to the ZIP of a GITHUB-repo as (e.g. https://github.com/maubot/reminder/archive/refs/heads/master.zip)
deploy_plugin () {
rm -rf /tmp/maubot-plugin*
wget -O /tmp/maubot-plugin.zip "$1" && unzip /tmp/maubot-plugin.zip -d /tmp/maubot-plugin
mbc login -u $ADMIN_USER_NAME -p $(cat /run/secrets/admin_password) -s https://$DOMAIN -a $DOMAIN
cd /tmp/maubot-plugin
mv -- "$(ls -A | head -n1)" extracted
mbc build -u /tmp/maubot-plugin/extracted
}
assign_bot_user_via_sso () {
mbc login -u $ADMIN_USER_NAME -p $(cat /run/secrets/admin_password) -s https://$DOMAIN -a $DOMAIN
mbc auth -h $HOMESERVER_HOST --update-client --sso
}