Install/update ActualBudget based on releases, not latest main

This commit is contained in:
Spyros Roum 2025-01-05 14:06:43 +02:00
parent d3d6ec8b20
commit 693ae94e7d
2 changed files with 7 additions and 3 deletions

View File

@ -34,11 +34,13 @@ function update_script() {
fi
msg_info "Updating ${APP}"
systemctl stop actualbudget.service
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq '.[0].name')
cd /opt/actualbudget
git pull &>/dev/null
git checkout "$RELEASE"
yarn install &>/dev/null
systemctl start actualbudget.service
msg_ok "Successfully Updated ${APP}"
msg_ok "Successfully Updated ${APP} to ${RELEASE}"
exit
}
@ -49,4 +51,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5006${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5006${CL}"

View File

@ -35,7 +35,8 @@ $STD apt-get install -y nodejs
$STD npm install --global yarn
msg_ok "Installed Node.js"
msg_info "Installing Actual Budget"
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual-server/tags | jq '.[0].name')
msg_info "Installing Actual Budget $RELEASE"
$STD git clone https://github.com/actualbudget/actual-server.git /opt/actualbudget
mkdir -p /opt/actualbudget/server-files
chown -R root:root /opt/actualbudget/server-files
@ -45,6 +46,7 @@ ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files
PORT=5006
EOF
cd /opt/actualbudget
$STD git checkout "$RELEASE"
$STD yarn install
msg_ok "Installed Actual Budget"