summarylogtreecommitdiffstats
path: root/maubot-db-upgrade
blob: 21f647b3cd04592ff52f28bca2af8150b12a5600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 
   exit 1
fi

cd /var/lib/maubot

if [[ ! -e /var/lib/maubot/alembic ]]; then
  ln -s /usr/share/maubot/alembic ./
fi
if [[ ! -e /var/lib/maubot/alembic.ini ]]; then
  ln -s /usr/share/maubot/alembic.ini ./
fi
sudo -u maubot alembic -x config=/etc/synapse/maubot/config.yaml upgrade head