mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 10:55:10 +00:00
Update actualbudget.sh
This commit is contained in:
parent
9a7dcef25a
commit
5170056078
@ -32,18 +32,26 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if ! command -v jq >/dev/null 2>&1; then
|
||||||
|
echo "Installing jq..."
|
||||||
|
apt-get install -y jq >/dev/null 2>&1
|
||||||
|
echo "Installed jq..."
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
systemctl stop actualbudget.service
|
systemctl stop actualbudget
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq --raw-output '.[0].name')
|
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq --raw-output '.[0].name')
|
||||||
TEMPD="$(mktemp -d)"
|
TEMPD="$(mktemp -d)"
|
||||||
cd "${TEMPD}"
|
cd "${TEMPD}"
|
||||||
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz
|
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz
|
||||||
|
mv /opt/actualbudget /opt/actualbudget_bak
|
||||||
mv actualbudget-actual-server-*/* /opt/actualbudget/
|
mv actualbudget-actual-server-*/* /opt/actualbudget/
|
||||||
cd /opt/actualbudget
|
cd /opt/actualbudget
|
||||||
yarn install &>/dev/null
|
yarn install &>/dev/null
|
||||||
systemctl start actualbudget.service
|
systemctl start actualbudget
|
||||||
msg_ok "Successfully Updated ${APP} to ${RELEASE}"
|
msg_ok "Successfully Updated ${APP} to ${RELEASE}"
|
||||||
rm -rf "${TEMPD}"
|
rm -rf "${TEMPD}"
|
||||||
|
rm -rf /opt/actualbudget_bak
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user