Skip to content
Snippets Groups Projects
Verified Commit 65158ac6 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[DBBackup] Fix config file name

parent 67dab3d5
No related branches found
No related tags found
No related merge requests found
Pipeline #54562 passed
......@@ -21,21 +21,15 @@ def add_value_to_key(value, key):
else:
os.environ[key] = value
CONFIG_FOLDER = '/config'
CONFIG_FILE = os.environ['HOSTNAME']
PATH_TO_CONFIG = CONFIG_FOLDER + '/' + CONFIG_FILE + '.json'
CONFIG_FILE = '/config/backup_config.json'
# Check if config file exists
if not(os.path.exists(CONFIG_FOLDER)):
sys.stderr.write('Err: BACKUP_FOLDER or CONFIG_FOLDER doesn\'t exist. \n')
sys.exit()
if not(os.path.isfile(PATH_TO_CONFIG)):
sys.stderr.write('Err: ' + PATH_TO_CONFIG + ' not found. \n')
if not(os.path.isfile(CONFIG_FILE)):
sys.stderr.write("Error : {0} config file not found".format(CONFIG_FILE))
sys.exit()
# Variables initialization
open_config_file = open(PATH_TO_CONFIG)
open_config_file = open(CONFIG_FILE)
services_list = json.load(open_config_file)
flag_mongo = False
flag_mysql = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment