option cleanup

This commit is contained in:
Matthias Kretschmann 2018-12-15 20:09:22 +01:00
parent fa6c3b8bb2
commit da1c7d76ac
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 9 additions and 7 deletions

View File

@ -22,11 +22,13 @@
Update script sets options by default, can be changed at top of script:
- `giteaBinary`: Gitea binary under `/home/git/gitea/gitea`
- `arch`: architecture is `linux-amd64`
- `giteaUpdateStorage`: downloaded files will be stored in `/home/git/gitea-update`
- `giteaUser`: linux user Gitea is running under, `git`
- `giteaGroup`: linux group Gitea is running under, `git`
Option | Default | Description
-- | -- | --
`giteaBinary` | `/home/git/gitea/gitea` | Gitea binary path
`arch` | `linux-amd64` | Server architecture
`giteaStore` | `/home/git/gitea-update` | Directory where update files will be stored
`giteaUser` | `git` | linux user Gitea is running under
`giteaGroup` | `git` | linux group Gitea is running under
```bash
# run update script with sudo, passing version number as option

View File

@ -9,7 +9,7 @@ set -e
version=$1
arch="linux-amd64"
giteaBinary="/home/git/gitea/gitea"
giteaUpdateStorage="/home/git/gitea-update"
giteaStore="/home/git/gitea-update"
giteaUser="git"
giteaGroup="git"
@ -18,7 +18,7 @@ sudo service gitea stop
echo "Stopped Gitea."
# download new binary
cd $giteaUpdateStorage
cd $giteaStore
echo "Downloading gitea-${version}-${arch}..."
wget -O "gitea-${version}-${arch}" "https://dl.gitea.io/gitea/${version}/gitea-${version}-${arch}"