summarylogtreecommitdiffstats
path: root/mautrix-telegram.run
blob: 4bba4b4b880f9aaf532e6063921eb1d2e9da1298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

cfgfile=/etc/mautrix-telegram/config.yaml
regfile=/etc/mautrix-telegram/registration.yaml

[ ! -f "$regfile" ] &&
  mautrix-telegram --config "$cfgfile" --registration "$regfile" --generate-registration

cd /etc/mautrix-telegram || exit
alembic -x "config=$cfgfile" upgrade head

exec python -m mautrix_telegram --config "$cfgfile" --registration "$regfile"