1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-19 13:58:06 +00:00

Actual: Add git dependency & change yarn commands (#3703)

This commit is contained in:
CanbiZ 2025-04-06 16:00:08 +02:00 committed by GitHub
parent c08ebc48e8
commit 427ce771d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 8 deletions

View File

@ -35,6 +35,13 @@ function update_script() {
systemctl stop actualbudget
msg_ok "${APP} Stopped"
if ! command -v git &>/dev/null; then
msg_info "Installing git"
$STD apt-get update
$STD apt-get install -y git
msg_ok "Installed git"
fi
msg_info "Updating ${APP} to ${RELEASE}"
cd /tmp || exit
curl -fsSL "https://github.com/actualbudget/actual/archive/refs/tags/v${RELEASE}.tar.gz" -o "v${RELEASE}.tar.gz"
@ -77,7 +84,9 @@ ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
EOF
fi
cd /opt/actualbudget || exit
$STD yarn workspaces focus @actual-app/sync-server --production
$STD yarn install
$STD yarn run build:server
#$STD yarn workspaces focus @actual-app/sync-server --production
echo "${RELEASE}" >/opt/actualbudget_version.txt
msg_ok "Updated ${APP}"

View File

@ -17,7 +17,8 @@ msg_info "Installing Dependencies"
$STD apt-get install -y \
tini \
gpg \
build-essential
build-essential \
git
msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository"
@ -33,11 +34,11 @@ $STD npm install --global yarn
msg_ok "Installed Node.js"
msg_info "Installing Actual Budget"
cd /opt
cd /opt || exit
RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -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")
tar -xzf v${RELEASE}.tar.gz
mv actual-${RELEASE} /opt/actualbudget
tar -xzf v"${RELEASE}".tar.gz
mv actual-"${RELEASE}" /opt/actualbudget
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
chown -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
ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key
ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
EOF
cd /opt/actualbudget
$STD yarn workspaces focus @actual-app/sync-server --production
cd /opt/actualbudget || exit
$STD yarn install
$STD yarn run build:server
$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt <<EOF
US
California
@ -93,7 +95,7 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/v${RELEASE}.tar.gz
rm -rf /opt/v"${RELEASE}".tar.gz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"