diff --git a/upgrade_gitea b/upgrade_gitea index 05fc604..1bfe93f 100644 --- a/upgrade_gitea +++ b/upgrade_gitea @@ -27,12 +27,18 @@ else # gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 gpg --verify gitea-$VERSION-linux-amd64.asc gitea-$VERSION-linux-amd64 + # Flush queues. + su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea -c /etc/gitea/gitea.ini manager flush-queues" + # Stop. systemctl stop gitea # Dump. su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea dump --tempdir $GITEA_HOME/tmp/ -c /etc/gitea/gitea.ini" + # Call doctor. + su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea doctor --all --fix -c /etc/gitea/gitea.ini" + # Upgrade. chmod u+x gitea-$VERSION-linux-amd64 chown git.git gitea-$VERSION-linux-amd64