File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 99import os
1010import pathlib
1111import platform
12+ import pprint
1213import sys
1314import time
1415
@@ -96,6 +97,11 @@ def main():
9697 action = "store_true" ,
9798 help = "Send test notification email using the `notification` settings. Should be used to validate settings." ,
9899 )
100+ parser .add_argument (
101+ "--show-config" ,
102+ action = "store_true" ,
103+ help = "Show runtime config, useful when using env vars in config file." ,
104+ )
99105
100106 args = parser .parse_args ()
101107
@@ -105,13 +111,17 @@ def main():
105111 else :
106112 setup_logger ()
107113
108- logging .debug (f"== starting mergin-db-sync daemon == version { __version__ } ==" )
109-
110114 try :
111115 update_config_path (args .config_file )
112116 except IOError as e :
113117 handle_error_and_exit (e )
114118
119+ if args .show_config :
120+ pprint .pprint (config .as_dict ())
121+ sys .exit (0 )
122+
123+ logging .debug (f"== starting mergin-db-sync daemon == version { __version__ } ==" )
124+
115125 sleep_time = config .as_int ("daemon.sleep_time" )
116126 try :
117127 validate_config (config )
You can’t perform that action at this time.
0 commit comments