commit: e79975f2ae384813e4add03629019c023a1d55f9
parent 0b933d9b4c732e8c549e6bcd04575a08ae46ca6e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 19 Dec 2024 21:49:32 +0100
rel/…/init.d/pleroma: run migrations before starting
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/changelog.d/opt-init.d-migrations b/changelog.d/opt-init.d-migrations
@@ -0,0 +1 @@
+- OTP/Packaged + OpenRC installs: Run migrations before starting pleroma
diff --git a/rel/files/installation/init.d/pleroma b/rel/files/installation/init.d/pleroma
@@ -24,3 +24,9 @@ depend() {
want nginx
need postgresql
}
+
+start_pre() {
+ ebegin "run migrations if any"
+ su -s /bin/sh -c '/opt/pleroma/bin/pleroma_ctl migrate' -l "${command_user}"
+ eend "$?"
+}