mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-19 12:56:01 +00:00
fixed update_script and obtaining latest releases
This commit is contained in:
16
ct/gitea.sh
16
ct/gitea.sh
@@ -27,7 +27,7 @@ EOF
|
||||
header_info
|
||||
echo -e "Loading..."
|
||||
APP="gitea"
|
||||
var_disk="5"
|
||||
var_disk="8"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_os="debian"
|
||||
@@ -63,10 +63,20 @@ function default_settings() {
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -f /lib/systemd/system/gitea.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
|
||||
msg_info "Updating ${APP} LXC"
|
||||
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||
VERSION=${RELEASE#v}
|
||||
msg_info "Updating ${APP}"
|
||||
wget -q https://github.com/go-gitea/gitea/releases/download/$RELEASE/gitea-$VERSION-linux-amd64
|
||||
systemctl stop gitea
|
||||
rm -rf /usr/local/bin/gitea
|
||||
mv gitea* /usr/local/bin/gitea
|
||||
systemctl start gitea
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/nullexit
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
else
|
||||
msg_ok "No update required ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user