From b64058ff4301606f9b32a877491a6b37227942e7 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Wed, 9 Mar 2022 01:47:04 +0100 Subject: [PATCH] upgrade script: add 'check' step --- upgrade.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/upgrade.sh b/upgrade.sh index 8fbec18..4663e1d 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -44,6 +44,12 @@ function backup() { set +x } +function check() { + set -ex + su - gitea -c "$BINDIR/gitea-$VERSION-linux-amd64 --config /etc/gitea/gitea.ini --work-path $WORKDIR doctor --all" + set +x +} + function upgrade() { set -ex su - gitea -c "WORKDIR=$WORKDIR $BINDIR/gitea-$VERSION-linux-amd64 --config /etc/gitea/gitea.ini migrate" @@ -57,7 +63,7 @@ function start() { set +x } -#Available steps: verify download stop backup upgrade start +#Available steps: verify download stop check backup upgrade start if [[ -z "$VERSION" ]]; then echo "VERSION isn't defined" 1>&2 else