mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-09 01:09:16 +00:00
Update opengist.sh
This commit is contained in:
parent
ef5bb1bd28
commit
456751e7cc
@ -35,6 +35,8 @@ function update_script() {
|
|||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop opengist.service
|
systemctl stop opengist.service
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
apt-get update &>/dev/null
|
||||||
|
apt-get upgrade &>/dev/null
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
@ -45,6 +47,8 @@ function update_script() {
|
|||||||
chmod +x /opt/opengist/opengist
|
chmod +x /opt/opengist/opengist
|
||||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||||
rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz
|
rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz
|
||||||
|
apt-get -y autoremove &>/dev/null
|
||||||
|
apt-get -y autoclean &>/dev/null
|
||||||
msg_ok "Updated ${APP} LXC"
|
msg_ok "Updated ${APP} LXC"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
Loading…
Reference in New Issue
Block a user