mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Breaking: Actual Budget Script (HTTPS / DB Migration / New Structure) - Read Description (#2496)
This commit is contained in:
		@@ -1,9 +1,9 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# License: MIT
 | 
			
		||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://actualbudget.org/
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
@@ -41,18 +41,32 @@ RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/late
 | 
			
		||||
wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz
 | 
			
		||||
tar -xzf v${RELEASE}.tar.gz
 | 
			
		||||
mv *ctual-server-* /opt/actualbudget
 | 
			
		||||
mkdir -p /opt/actualbudget/server-files
 | 
			
		||||
mkdir -p /opt/actualbudget-data
 | 
			
		||||
chown -R root:root /opt/actualbudget/server-files
 | 
			
		||||
chmod 755 /opt/actualbudget/server-files
 | 
			
		||||
cat <<EOF > /opt/actualbudget/.env
 | 
			
		||||
ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files
 | 
			
		||||
 | 
			
		||||
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
 | 
			
		||||
chown -R root:root /opt/actualbudget-data
 | 
			
		||||
chmod -R 755 /opt/actualbudget-data
 | 
			
		||||
 | 
			
		||||
cat <<EOF > /opt/actualbudget-data/.env
 | 
			
		||||
ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload
 | 
			
		||||
ACTUAL_DATA_DIR=/opt/actualbudget-data
 | 
			
		||||
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget/server-files
 | 
			
		||||
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files
 | 
			
		||||
ACTUAL_USER_FILES=/opt/actualbudget-data/user-files
 | 
			
		||||
PORT=5006
 | 
			
		||||
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"
 | 
			
		||||
ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key
 | 
			
		||||
ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt
 | 
			
		||||
EOF
 | 
			
		||||
cd /opt/actualbudget
 | 
			
		||||
$STD yarn install
 | 
			
		||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt <<EOF
 | 
			
		||||
US
 | 
			
		||||
California
 | 
			
		||||
San Francisco
 | 
			
		||||
My Organization
 | 
			
		||||
My Unit
 | 
			
		||||
localhost
 | 
			
		||||
myemail@example.com
 | 
			
		||||
EOF
 | 
			
		||||
echo "${RELEASE}" >"/opt/actualbudget_version.txt"
 | 
			
		||||
msg_ok "Installed Actual Budget"
 | 
			
		||||
 | 
			
		||||
@@ -67,7 +81,7 @@ Type=simple
 | 
			
		||||
User=root
 | 
			
		||||
Group=root
 | 
			
		||||
WorkingDirectory=/opt/actualbudget
 | 
			
		||||
EnvironmentFile=/opt/actualbudget/.env
 | 
			
		||||
EnvironmentFile=/opt/actualbudget-data/.env
 | 
			
		||||
ExecStart=/usr/bin/yarn start
 | 
			
		||||
Restart=always
 | 
			
		||||
RestartSec=10
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user