upgrade script: add 'check' step

This commit is contained in:
Pierre-Louis Bonicoli 2022-03-09 01:47:04 +01:00
parent 3cdf79e896
commit b64058ff43
Signed by: pilou
GPG Key ID: 06914C4A5EDAA6DD

View File

@ -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