gitea install script; rename resolvers; fix lfs
This commit is contained in:
17
gitea/files/install.sh
Normal file
17
gitea/files/install.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
{% set gitea_version = salt.pillar.get('gitea:version') %}
|
||||
{% set base_path = salt.pillar.get('gitea:path') %}
|
||||
|
||||
URL="https://github.com/go-gitea/gitea/releases/download/v{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64"
|
||||
|
||||
# We can't replace the gitea bin while it's running
|
||||
systemctl stop gitea || true
|
||||
|
||||
wget --quiet "${URL}" -O "{{ base_path }}/bin/gitea.tmp"
|
||||
if [ $? -eq 0 ]; then
|
||||
chmod +x "{{ base_path }}/bin/gitea.tmp"
|
||||
mv -v "{{ base_path }}/bin/gitea.tmp" "{{ base_path }}/bin/gitea"
|
||||
else
|
||||
rm -f "{{ base_path }}/bin/gitea.tmp"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user