From e5026282fe460465250da72f58f5b118a61769a2 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 27 Oct 2025 20:50:04 -0700 Subject: [PATCH] main: Allow setting development mode from environment - Similar to freedombox-privileged daemon. It makes it easy to turn on development mode from a systemd service override (without having to override the entire command line). Tests: - With the changes to systemd service file in this patch series, changing source code file leads to plinth getting restarted. Reviewed-by: Veiko Aasa --- plinth/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plinth/__main__.py b/plinth/__main__.py index 88fbbed45..e604c55f4 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -3,6 +3,7 @@ import argparse import logging +import os import sys import threading @@ -121,7 +122,8 @@ def main(): arguments = parse_arguments() cfg.read() - if arguments.develop: + if arguments.develop or os.getenv('FREEDOMBOX_DEVELOP', '') == '1': + cfg.develop = True # Use the config in the current working directory cfg.read_file(cfg.get_develop_config_path())