@@ -24,33 +24,32 @@ function update_script() {
2424 check_container_storage
2525 check_container_resources
2626
27- if [[ ! -f /opt/actualbudget_version.txt ]]; then
27+ if [[ ! -f ~ /.actualbudget && ! -f /opt/actualbudget_version.txt ]]; then
2828 msg_error " No ${APP} Installation Found!"
2929 exit
3030 fi
31+
3132 NODE_VERSION=" 22" setup_nodejs
32- RELEASE=$( curl -fsSL https://api.github.com/repos/ actualbudget/actual/releases/latest | grep " tag_name " | awk ' {print substr($2, 3, length($2)-4) } ' )
33+ RELEASE=$( get_latest_github_release " actualbudget/actual" )
3334 if [[ -f /opt/actualbudget-data/config.json ]]; then
34- if [[ ! -f /opt/actualbudget_version.txt ]] || [[ " ${RELEASE} " != " $( cat /opt/actualbudget_version.txt ) " ]] ; then
35+ if check_for_gh_release " actualbudget " " actualbudget/actual " ; then
3536 msg_info " Stopping Service"
3637 systemctl stop actualbudget
3738 msg_ok " Stopped Service"
3839
39- msg_info " Updating ${APP} to ${RELEASE} "
40+ msg_info " Updating Actual Budget to ${RELEASE} "
4041 $STD npm update -g @actual-app/sync-server
41- echo " ${RELEASE} " > /opt/actualbudget_version.txt
42- msg_ok " Updated ${APP} to ${RELEASE} "
42+ echo " ${RELEASE} " > ~/.actualbudget
43+ msg_ok " Updated Actual Budget to ${RELEASE} "
4344
4445 msg_info " Starting Service"
4546 systemctl start actualbudget
4647 msg_ok " Started Service"
4748 msg_ok " Updated successfully!"
48- else
49- msg_info " ${APP} is already up to date"
5049 fi
5150 else
5251 msg_info " Old Installation Found, you need to migrate your data and recreate to a new container"
53- msg_info " Please follow the instructions on the ${APP} website to migrate your data"
52+ msg_info " Please follow the instructions on the Actual Budget website to migrate your data"
5453 msg_info " https://actualbudget.org/docs/backup-restore/backup"
5554 exit
5655 fi
0 commit comments