From ef7fc55864733d1820f27d1f374a60974f669ea6 Mon Sep 17 00:00:00 2001 From: Harvey Tindall <harveyltindall@gmail.com> Date: Sat, 2 May 2020 19:09:02 +0100 Subject: [PATCH] Fix first start for docker --- jf-accounts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jf-accounts b/jf-accounts index e51ba7d..cfc0e61 100755 --- a/jf-accounts +++ b/jf-accounts @@ -37,9 +37,10 @@ else: local_dir = (Path(__file__).parents[2] / 'data').resolve() first_run = False -if not data_dir.exists(): - Path.mkdir(data_dir) - print(f'Config dir not found, so created at {str(data_dir)}') +if data_dir.exists() is False or (data_dir / 'config.ini').exists() is False: + if not data_dir.exists(): + Path.mkdir(data_dir) + print(f'Config dir not found, so created at {str(data_dir)}') if args.config is None: config_path = data_dir / 'config.ini' shutil.copy(str(local_dir / 'config-default.ini'),