From cc783757a9ee5e225ea6f8045b324a4d8d0d3dd4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Jul 2024 20:03:33 +0200 Subject: [PATCH] Initial commit. --- README.insrtall | 5 +++ README.update | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 README.insrtall create mode 100644 README.update diff --git a/README.insrtall b/README.insrtall new file mode 100644 index 0000000..b7b75e6 --- /dev/null +++ b/README.insrtall @@ -0,0 +1,5 @@ +# --- +# Install Gitea +# --- + +# see: https://docs.gitea.com/category/installation diff --git a/README.update b/README.update new file mode 100644 index 0000000..d8271f1 --- /dev/null +++ b/README.update @@ -0,0 +1,110 @@ +# ============ +# Update Gitea +# ============ + + +# --- +# get info on new releases +# +# see: https://blog.gitea.com/tags/release/ +# --- + + +export GITEA_RELEASE_NUMBER="1.22.1" +echo $GITEA_RELEASE_NUMBER + + +# use terminal multiplexer for security and flexibility +# +tmux + + +# run commands as user git +# +su git -s /bin/bash - + + +mkdir -p /home/git/temp_backups + + +# check if everything is OK +# +/usr/local/bin/gitea doctor check \ + --config /etc/gitea/app.ini \ + --work-path /var/lib/gitea/ \ + --custom-path /var/lib/gitea/custom/ + + +# make a backup +# +cd /home/git/temp_backups && +/usr/local/bin/gitea dump \ + --config /etc/gitea/app.ini \ + --custom-path /var/lib/gitea/custom \ + --work-path /var/lib/gitea + + +# Add pub-key to your key-ring only if necessary: +# +gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 + + +# download new binary and signature and verify the download +# +cd /tmp && +wget https://dl.gitea.com/gitea/$GITEA_RELEASE_NUMBER/gitea-$GITEA_RELEASE_NUMBER-linux-amd64 && +wget https://dl.gitea.com/gitea/$GITEA_RELEASE_NUMBER/gitea-$GITEA_RELEASE_NUMBER-linux-amd64.asc && +gpg --verify gitea-$GITEA_RELEASE_NUMBER-linux-amd64.asc gitea-$GITEA_RELEASE_NUMBER-linux-amd64 + + +# exit from git user back to root user +# +exit + + +# as root-user: stop service +# +systemctl stop gitea + + +# as root-user: move binary in place +# +mv /tmp/gitea-$GITEA_RELEASE_NUMBER-linux-amd64 /usr/local/bin/ +chmod u+x /usr/local/bin/gitea-$GITEA_RELEASE_NUMBER-linux-amd64 +chown git:git /usr/local/bin/gitea-$GITEA_RELEASE_NUMBER-linux-amd64 + +# Delete and Renew symlink to new gitea binary +# +rm /usr/local/bin/gitea +ln -s gitea-$GITEA_RELEASE_NUMBER-linux-amd64 /usr/local/bin/gitea + + +# as root-user: start service +# +systemctl start gitea && systemctl restart nginx + + +# run commands as user git +# +su git -s /bin/bash - + + +# check if everything is OK +# +/usr/local/bin/gitea doctor check \ + --config /etc/gitea/app.ini \ + --work-path /var/lib/gitea/ \ + --custom-path /var/lib/gitea/custom/ + + +# remove remaining OpenPGP-signature from /tmp directory +# +rm /tmp/gitea-$GITEA_RELEASE_NUMBER-linux-amd64.asc + + +# check on website +# +# visit: +# https://git.warenform.de/admin/config +# https://git.oopen.de/admin/config +# https://todo.so36.net/admin/config