1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-02-01 14:51:50 +00:00

Update actualbudget.sh

This commit is contained in:
CanbiZ 2025-01-24 13:32:20 +01:00 committed by GitHub
parent 63061ea06f
commit c4532f538b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,12 +41,13 @@ function update_script() {
fi
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq --raw-output '.[0].name')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then
msg_info "Stopping ${APP}"
systemctl stop actualbudget
msg_ok "${APP} Stopped"
msg_info "Updating ${APP} to ${RELEASE}"
cd /tmp
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O actual-server.tar.gz
tar -xzvf actual-server.tar.gz >/dev/null 2>&1
mv /opt/actualbudget /opt/actualbudget_bak
@ -65,6 +66,7 @@ function update_script() {
msg_info "Cleaning Up"
rm -rf /opt/actualbudget_bak
rm -rf /tmp/actual-server.tar.gz
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else