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