diff options
author | satcom886 | 2020-07-28 20:07:08 +0200 |
---|---|---|
committer | satcom886 | 2020-07-28 20:07:08 +0200 |
commit | b61768fee2e4f05a2608af84a0a15181224f3cc0 (patch) | |
tree | 5b9eed6eb6beb96c06db528757b36976546661b7 /maubot-db-upgrade | |
download | aur-b61768fee2e4f05a2608af84a0a15181224f3cc0.tar.gz |
Initial commit
Diffstat (limited to 'maubot-db-upgrade')
-rw-r--r-- | maubot-db-upgrade | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/maubot-db-upgrade b/maubot-db-upgrade new file mode 100644 index 000000000000..21f647b3cd04 --- /dev/null +++ b/maubot-db-upgrade @@ -0,0 +1,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 |