From fbb0bb48683cb0c350ed8d4084a8033ac43f2632 Mon Sep 17 00:00:00 2001 From: lyarinet-netizen Date: Thu, 22 Jan 2026 14:52:40 +0000 Subject: [PATCH] Fix DEV_MODE detection in run_app.sh - Changed run_app.sh to set SAMBA_MANAGER_DEV_MODE environment variable instead of modifying samba_utils.py - This ensures proper DEV_MODE detection based on whether the app is running as root or not - Fixes issues with accessing /etc/samba/ files when running as regular user --- run_app.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/run_app.sh b/run_app.sh index 7ee9518a..f4aaba99 100755 --- a/run_app.sh +++ b/run_app.sh @@ -48,12 +48,10 @@ echo "Starting terminal service..." # Check if app is running with sudo if [ "$EUID" -eq 0 ]; then echo "Running in production mode with sudo..." - # Set DEV_MODE to False in samba_utils.py - sed -i 's/DEV_MODE = True/DEV_MODE = False/g' app/samba_utils.py + export SAMBA_MANAGER_DEV_MODE=0 else echo "Running in development mode..." - # Set DEV_MODE to True in samba_utils.py - sed -i 's/DEV_MODE = False/DEV_MODE = True/g' app/samba_utils.py + export SAMBA_MANAGER_DEV_MODE=1 fi # Run the application