feat: Source .env file safely in update script for improved security
This commit is contained in:
@@ -28,7 +28,10 @@ fi
|
|||||||
|
|
||||||
# Load DB credentials from .env
|
# Load DB credentials from .env
|
||||||
if [ -f .env ]; then
|
if [ -f .env ]; then
|
||||||
export $(grep -v '^#' .env | xargs)
|
# Source .env file safely
|
||||||
|
set -a
|
||||||
|
source .env
|
||||||
|
set +a
|
||||||
DB_USER=${DB_USERNAME:-amnezia}
|
DB_USER=${DB_USERNAME:-amnezia}
|
||||||
DB_PASS=${DB_PASSWORD:-amnezia}
|
DB_PASS=${DB_PASSWORD:-amnezia}
|
||||||
DB_ROOT_PASS=${DB_ROOT_PASSWORD:-rootpassword}
|
DB_ROOT_PASS=${DB_ROOT_PASSWORD:-rootpassword}
|
||||||
|
|||||||
Reference in New Issue
Block a user