summarylogtreecommitdiffstats
path: root/mautrix-hangouts-db-upgrade
blob: d457b17660e552614088471d8d655a9fe7893c85 (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/mautrix-hangouts

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