-
-
Save salesgroup/bacb5882250df8d843491efe2784b38c to your computer and use it in GitHub Desktop.
#!/bin/bash | |
GITEA_INSTALLED=`/volume1/@appstore/Gitea/gitea/gitea --version | cut -d \ -f 3` | |
LATEST_URL=`curl -Ls -o /dev/null -w %{url_effective} https://github.com/go-gitea/gitea/releases/latest` | |
#https://github.com/go-gitea/gitea/releases/tag/v1.11.3 | |
echo LATEST_URL = ${LATEST_URL} | |
GITEA_VERSION=${LATEST_URL##*/v} | |
if [ "${GITEA_INSTALLED}" == "${GITEA_VERSION}" ]; then | |
echo "Same version" | |
exit 0 | |
fi | |
#Install | |
echo "Installed:"${GITEA_INSTALLED} | |
echo "LATEST:"${GITEA_VERSION} | |
rm -rf /tmp/gitea | |
mkdir /tmp/gitea | |
cd /tmp/gitea | |
git clone https://github.com/flipswitchingmonkey/gitea-spk.git | |
cd gitea-spk | |
DOWNLOAD_URL=https://github.com/go-gitea/gitea/releases/download/v${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64.xz | |
echo ${DOWNLOAD_URL} | |
wget ${DOWNLOAD_URL} | |
xz --decompress gitea-*.xz | |
./create_spk.sh | |
sudo synoservice --stop pkgctl-Gitea | |
sudo synoservice --status pkgctl-Gitea | |
sudo synopkg install /tmp/gitea/gitea-spk/gitea-${GITEA_VERSION}-linux-amd64.spk | |
sudo synoservice --start pkgctl-Gitea | |
exit 1 |
No problem so far, we've been using this for several months.
We also added:
-a version with acme.sh to renew the SSL certificate.
-boot-up event to start gitea, with "synoservice --start pkgctl-Gitea"
No problem so far, we've been using this for several months.
We also added:
-a version with acme.sh to renew the SSL certificate.
-boot-up event to start gitea, with "synoservice --start pkgctl-Gitea"
Thx, nice one! Actually, the only thing that should be changed is line 24 and 34, whitch depends on your synology CPU architecture. Do you have any problems with custom confugiration in app.ini in every update? What is being delated and should be replaced by hand after update?
Yes, line 24 and 34 depends on your synology CPU architecture. No need to change anything in app.ini after the updates.
Everything runs smoothly. This cron job runs once a day.
Thx, your script worked like a charm. Only thing that had a problem was synoservice --start and I had to run Gitea manually from Package Center. Everything else just works fine
Please can you help me. I tried to make gitea over https. I see your post here. I have a DS918+ with DSM 7. I tried to install the spk. but the packet manager said he cannot install with root access. What can I do ? I don't want it to install in docker. Thanks.
Script from flipswitchingmonkey will not work with DSM7, it should be rewritten.
Last time I tried to update my system manually, I managed to wipe my database somehow and had to re-import all of my repositories. Have you had any issues like this when using this script to update?