Skip to content

Commit c4532f5

Browse files
authored
Update actualbudget.sh
1 parent 63061ea commit c4532f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ct/actualbudget.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ function update_script() {
4141
fi
4242

4343
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq --raw-output '.[0].name')
44-
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
44+
if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then
4545
msg_info "Stopping ${APP}"
4646
systemctl stop actualbudget
4747
msg_ok "${APP} Stopped"
4848

4949
msg_info "Updating ${APP} to ${RELEASE}"
50+
cd /tmp
5051
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O actual-server.tar.gz
5152
tar -xzvf actual-server.tar.gz >/dev/null 2>&1
5253
mv /opt/actualbudget /opt/actualbudget_bak
@@ -65,6 +66,7 @@ function update_script() {
6566

6667
msg_info "Cleaning Up"
6768
rm -rf /opt/actualbudget_bak
69+
rm -rf /tmp/actual-server.tar.gz
6870
msg_ok "Cleaned"
6971
msg_ok "Updated Successfully"
7072
else

0 commit comments

Comments
 (0)