Skip to content

Commit 6a94071

Browse files
authored
Breaking: Remove Update Function for Actual Budget until it fixed (#2768)
1 parent 53b30e5 commit 6a94071

File tree

1 file changed

+2
-83
lines changed

1 file changed

+2
-83
lines changed

ct/actualbudget.sh

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -28,89 +28,8 @@ function update_script() {
2828
msg_error "No ${APP} Installation Found!"
2929
exit 1
3030
fi
31-
32-
RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | \
33-
grep "tag_name" | awk -F '"' '{print substr($4, 2)}')
34-
35-
if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then
36-
msg_info "Stopping ${APP}"
37-
systemctl stop actualbudget
38-
msg_ok "${APP} Stopped"
39-
40-
msg_info "Updating ${APP} to ${RELEASE}"
41-
cd /tmp
42-
wget -q "https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz"
43-
44-
mv /opt/actualbudget /opt/actualbudget_bak
45-
$STD tar -xzf "v${RELEASE}.tar.gz"
46-
mv *ctual-server-* /opt/actualbudget
47-
48-
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
49-
for dir in server-files .migrate user-files migrations; do
50-
if [[ -d /opt/actualbudget_bak/$dir ]]; then
51-
mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ || true
52-
fi
53-
done
54-
if [[ -f /opt/actualbudget-data/migrate/.migrations ]]; then
55-
sed -i 's/null/1732656575219/g' /opt/actualbudget-data/migrate/.migrations
56-
sed -i 's/null/1732656575220/g' /opt/actualbudget-data/migrate/.migrations
57-
fi
58-
if [[ -f /opt/actualbudget/server-files/account.sqlite ]] && [[ ! -f /opt/actualbudget-data/server-files/account.sqlite ]]; then
59-
mv /opt/actualbudget/server-files/account.sqlite /opt/actualbudget-data/server-files/account.sqlite
60-
fi
61-
62-
if [[ -f /opt/actualbudget_bak/.env ]]; then
63-
mv /opt/actualbudget_bak/.env /opt/actualbudget-data/.env
64-
else
65-
cat <<EOF > /opt/actualbudget-data/.env
66-
ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload
67-
ACTUAL_DATA_DIR=/opt/actualbudget-data
68-
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files
69-
ACTUAL_USER_FILES=/opt/actualbudget-data/user-files
70-
PORT=5006
71-
ACTUAL_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32,::1/128,fc00::/7"
72-
ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key
73-
ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
74-
EOF
75-
fi
76-
cd /opt/actualbudget
77-
$STD yarn install
78-
echo "${RELEASE}" > /opt/actualbudget_version.txt
79-
msg_ok "Updated ${APP}"
80-
81-
msg_info "Starting ${APP}"
82-
cat <<EOF > /etc/systemd/system/actualbudget.service
83-
[Unit]
84-
Description=Actual Budget Service
85-
After=network.target
86-
87-
[Service]
88-
Type=simple
89-
User=root
90-
Group=root
91-
WorkingDirectory=/opt/actualbudget
92-
EnvironmentFile=/opt/actualbudget-data/.env
93-
ExecStart=/usr/bin/yarn start
94-
Restart=always
95-
RestartSec=10
96-
97-
[Install]
98-
WantedBy=multi-user.target
99-
EOF
100-
101-
systemctl daemon-reload
102-
systemctl start actualbudget
103-
msg_ok "Started ${APP}"
104-
105-
msg_info "Cleaning Up"
106-
rm -rf /opt/actualbudget_bak
107-
rm -rf "/tmp/v${RELEASE}.tar.gz"
108-
msg_ok "Cleaned"
109-
msg_ok "Updated Successfully"
110-
else
111-
msg_ok "No update required. ${APP} is already at ${RELEASE}"
112-
fi
113-
exit 0
31+
msg_error "Due to major changes in the Actual Budget repository, we are currently unable to provide updates. Please check back later."
32+
exit
11433
}
11534

11635
start

0 commit comments

Comments
 (0)