From b75ef80ef50df7088fdacb016c3943d878a6c57b Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sat, 29 Feb 2020 22:54:19 +0100
Subject: [PATCH] Basic Pleroma updating script.

---
 buster/setup_scripts/update_pleroma.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 buster/setup_scripts/update_pleroma.sh

diff --git a/buster/setup_scripts/update_pleroma.sh b/buster/setup_scripts/update_pleroma.sh
new file mode 100644
index 0000000..cf63eb8
--- /dev/null
+++ b/buster/setup_scripts/update_pleroma.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+set -x
+
+# Heavily inspired by <https://docs-develop.pleroma.social/backend/administration/updating/>
+su pleroma -s $SHELL -lc 'cd /opt/pleroma && git pull && mix deps.get'
+service pleroma stop
+su pleroma -s $SHELL -lc 'MIX_ENV=prod cd /opt/pleroma && mix ecto.migrate'
+service pleroma start
-- 
2.30.2