From 5039e0fd17351a8e122af9e076ea0869609c110c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 May 2026 18:57:37 +0000 Subject: [PATCH] Fix Databasus .env file location so service starts correctly Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/5b4ddcc8-18a3-49b4-9281-b14c712ebb7f Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com> --- ct/databasus.sh | 7 ++++--- install/databasus-install.sh | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/databasus.sh b/ct/databasus.sh index 3928b8a6c..99306130a 100644 --- a/ct/databasus.sh +++ b/ct/databasus.sh @@ -35,7 +35,8 @@ function update_script() { msg_ok "Stopped Databasus" msg_info "Backing up Configuration" - cp /opt/databasus/.env /opt/databasus.env.bak + cp /.env /opt/databasus.env.bak + chmod 600 /opt/databasus.env.bak msg_ok "Backed up Configuration" msg_info "Ensuring Database Clients" @@ -84,9 +85,9 @@ function update_script() { msg_ok "Updated Databasus" msg_info "Restoring Configuration" - cp /opt/databasus.env.bak /opt/databasus/.env + cp /opt/databasus.env.bak /.env rm -f /opt/databasus.env.bak - chown postgres:postgres /opt/databasus/.env + chmod 600 /.env msg_ok "Restored Configuration" msg_info "Starting Databasus" diff --git a/install/databasus-install.sh b/install/databasus-install.sh index 34db70d99..7e7adf977 100644 --- a/install/databasus-install.sh +++ b/install/databasus-install.sh @@ -79,7 +79,7 @@ ENCRYPTION_KEY=$(openssl rand -hex 32) # Install goose for migrations $STD go install github.com/pressly/goose/v3/cmd/goose@latest ln -sf /root/go/bin/goose /usr/local/bin/goose -cat </opt/databasus/.env +cat </.env # Environment ENV_MODE=production @@ -109,8 +109,7 @@ DATA_DIR=/databasus-data/data BACKUP_DIR=/databasus-data/backups LOG_DIR=/databasus-data/logs EOF -chown postgres:postgres /opt/databasus/.env -chmod 600 /opt/databasus/.env +chmod 600 /.env msg_ok "Configured Databasus" msg_info "Configuring Valkey" @@ -148,7 +147,7 @@ Requires=postgresql.service valkey.service [Service] Type=simple WorkingDirectory=/opt/databasus -EnvironmentFile=/opt/databasus/.env +EnvironmentFile=/.env ExecStart=/opt/databasus/databasus Restart=always RestartSec=5