From e98bf38af66cd80748d060044f017cea5bb20f9f Mon Sep 17 00:00:00 2001 From: Ollama Date: Fri, 15 May 2026 10:04:42 +0200 Subject: [PATCH] fix: configure .env even when .env.example doesn't exist Release zip contains .env directly, not .env.example. The sed commands to update database credentials were being skipped because the file check looked for .env.example first, which doesn't exist in published releases. --- scripts/install-ubuntu.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install-ubuntu.sh b/scripts/install-ubuntu.sh index f369245c3..85ce4120c 100644 --- a/scripts/install-ubuntu.sh +++ b/scripts/install-ubuntu.sh @@ -160,6 +160,9 @@ fi echo -e "${COLOR_GREEN}[7/9] Configuring OSPOS...${COLOR_RESET}" if [ -f ".env.example" ]; then cp .env.example .env +fi + +if [ -f ".env" ]; then sed -i "s/database\.default\.hostname = localhost/database.default.hostname = ${DB_HOST}/" .env sed -i "s/database\.default\.database = ospos/database.default.database = ${DB_NAME}/" .env sed -i "s/database\.default\.username = admin/database.default.username = ${DB_USER}/" .env