mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
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 <veiko17@disroot.org>
This commit is contained in:
parent
623604649e
commit
e5026282fe
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
@ -121,7 +122,8 @@ def main():
|
|||||||
arguments = parse_arguments()
|
arguments = parse_arguments()
|
||||||
|
|
||||||
cfg.read()
|
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
|
# Use the config in the current working directory
|
||||||
cfg.read_file(cfg.get_develop_config_path())
|
cfg.read_file(cfg.get_develop_config_path())
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user