@@ -17,7 +17,8 @@ msg_info "Installing Dependencies"
1717$STD apt-get install -y \
1818 tini \
1919 gpg \
20- build-essential
20+ build-essential \
21+ git
2122msg_ok " Installed Dependencies"
2223
2324msg_info " Setting up Node.js Repository"
@@ -33,11 +34,11 @@ $STD npm install --global yarn
3334msg_ok " Installed Node.js"
3435
3536msg_info " Installing Actual Budget"
36- cd /opt
37+ cd /opt || exit
3738RELEASE=$( curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
3839curl -fsSL " https://github.com/actualbudget/actual/archive/refs/tags/v${RELEASE} .tar.gz" -o $( basename " https://github.com/actualbudget/actual/archive/refs/tags/v${RELEASE} .tar.gz" )
39- tar -xzf v${RELEASE} .tar.gz
40- mv actual-${RELEASE} /opt/actualbudget
40+ tar -xzf v" ${RELEASE} " .tar.gz
41+ mv actual-" ${RELEASE} " /opt/actualbudget
4142
4243mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
4344chown -R root:root /opt/actualbudget-data
@@ -53,8 +54,9 @@ ACTUAL_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32,::1
5354ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key
5455ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
5556EOF
56- cd /opt/actualbudget
57- $STD yarn workspaces focus @actual-app/sync-server --production
57+ cd /opt/actualbudget || exit
58+ $STD yarn install
59+ $STD yarn run build:server
5860$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt << EOF
5961US
6062California
@@ -93,7 +95,7 @@ motd_ssh
9395customize
9496
9597msg_info " Cleaning up"
96- rm -rf /opt/v${RELEASE} .tar.gz
98+ rm -rf /opt/v" ${RELEASE} " .tar.gz
9799$STD apt-get -y autoremove
98100$STD apt-get -y autoclean
99101msg_ok " Cleaned"
0 commit comments