upgrade script: add 'check' step
This commit is contained in:
parent
3cdf79e896
commit
b64058ff43
@ -44,6 +44,12 @@ function backup() {
|
|||||||
set +x
|
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() {
|
function upgrade() {
|
||||||
set -ex
|
set -ex
|
||||||
su - gitea -c "WORKDIR=$WORKDIR $BINDIR/gitea-$VERSION-linux-amd64 --config /etc/gitea/gitea.ini migrate"
|
su - gitea -c "WORKDIR=$WORKDIR $BINDIR/gitea-$VERSION-linux-amd64 --config /etc/gitea/gitea.ini migrate"
|
||||||
@ -57,7 +63,7 @@ function start() {
|
|||||||
set +x
|
set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
#Available steps: verify download stop backup upgrade start
|
#Available steps: verify download stop check backup upgrade start
|
||||||
if [[ -z "$VERSION" ]]; then
|
if [[ -z "$VERSION" ]]; then
|
||||||
echo "VERSION isn't defined" 1>&2
|
echo "VERSION isn't defined" 1>&2
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user