Merge pull request 'OpenRC: Automatically run migrations before starting pleroma' (#7680) from gitlab-mr-iid-4303 into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7680
This commit is contained in:
lain 2026-07-29 11:07:32 +00:00
commit e143e645d3
3 changed files with 17 additions and 2 deletions

View file

@ -17,6 +17,13 @@ retry="SIGTERM/30/SIGKILL/5"
pidfile="/var/run/pleroma.pid"
depend() {
want nginx
need postgresql
want nginx
need postgresql
}
start_pre() {
ebegin "running migrations if any"
su -s /bin/sh -c "cd \"${directory}\" && exec /opt/pleroma/bin/pleroma_ctl migrate" \
"${command_user%%:*}"
eend "$?"
}