Migrated from gitea to forgejo upgrade script.
This commit is contained in:
parent
ab0a9ae721
commit
61106a3692
1 changed files with 25 additions and 19 deletions
28
upgrade
28
upgrade
|
@ -18,13 +18,17 @@ else
|
||||||
if ./gitea --version | grep -q "version $VERSION " ; then
|
if ./gitea --version | grep -q "version $VERSION " ; then
|
||||||
echo "Same version."
|
echo "Same version."
|
||||||
else
|
else
|
||||||
# Download.
|
# Download the binary file.
|
||||||
wget https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64
|
wget https://codeberg.org/forgejo/forgejo/releases/download/v${VERSION}/forgejo-${VERSION}-linux-amd64
|
||||||
wget https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64.asc
|
|
||||||
wget https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64.sha256
|
# Check the binary file.
|
||||||
sha256sum -c gitea-$VERSION-linux-amd64.sha256
|
wget https://codeberg.org/forgejo/forgejo/releases/download/v${VERSION}/forgejo-${VERSION}-linux-amd64.sha256
|
||||||
# gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
sha256sum -c forgejo-${VERSION}-linux-amd64.sha256
|
||||||
gpg --verify gitea-$VERSION-linux-amd64.asc gitea-$VERSION-linux-amd64
|
|
||||||
|
# Verify the binary file.
|
||||||
|
wget https://codeberg.org/forgejo/forgejo/releases/download/v${VERSION}/forgejo-${VERSION}-linux-amd64.asc
|
||||||
|
# gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
||||||
|
gpg --verify forgejo-${VERSION}-linux-amd64.asc forgejo-${VERSION}-linux-amd64
|
||||||
|
|
||||||
# Flush queues.
|
# Flush queues.
|
||||||
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea -c /etc/gitea/gitea.ini manager flush-queues"
|
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea -c /etc/gitea/gitea.ini manager flush-queues"
|
||||||
|
@ -36,12 +40,14 @@ else
|
||||||
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea dump --tempdir $GITEA_HOME/tmp/ -c /etc/gitea/gitea.ini"
|
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea dump --tempdir $GITEA_HOME/tmp/ -c /etc/gitea/gitea.ini"
|
||||||
|
|
||||||
# Call doctor.
|
# Call doctor.
|
||||||
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea doctor --all --fix -c /etc/gitea/gitea.ini"
|
#su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea doctor --all --fix -c /etc/gitea/gitea.ini"
|
||||||
|
#su - git -c "cd /srv/forgejo/bin ; $BINDIR/forgejo doctor --all --fix -c /etc/forgejo/forgejo.ini -C /srv/forgejo/custom -w /srv/forgejo/"
|
||||||
|
su - git -c "cd /srv/gitea/bin ; $BINDIR/gitea doctor check --all --fix -c /etc/gitea/gitea.ini -C /srv/gitea/custom -w /srv/gitea/"
|
||||||
|
|
||||||
# Upgrade.
|
# Upgrade.
|
||||||
chmod u+x gitea-$VERSION-linux-amd64
|
chmod u+x forgejo-$VERSION-linux-amd64
|
||||||
chown git.gitea gitea-$VERSION-linux-amd64
|
chown git:gitea forgejo-$VERSION-linux-amd64
|
||||||
ln --force gitea-$VERSION-linux-amd64 gitea
|
ln --force forgejo-$VERSION-linux-amd64 gitea
|
||||||
|
|
||||||
# Start.
|
# Start.
|
||||||
#systemctl start gitea
|
#systemctl start gitea
|
||||||
|
|
Loading…
Reference in a new issue