Commit 5a60ad67 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Tristan Cavelier

monitor: write service parameters in run folder

parent 4c295942
......@@ -87,7 +87,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
download-only = true
md5sum = eac72b9a452a1fb0a955c7cebb2d3c23
md5sum = d5f29fa859a45696e1ff1bb174ab1111
filename = monitor-service-run.in
mode = 0644
......
......@@ -16,11 +16,11 @@ def loadConfig(config_file):
def main():
config = loadConfig(configuration_location)
exec_env = os.environ.copy()
script_path = config.get("service", "script-path")
executable_folder = os.path.dirname(script_path)
executable = os.path.basename(script_path)
parameter_json = os.path.join(os.getcwd(), 'parameters.json')
parameter_json = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'parameters_%%s.json' %% executable)
with open(parameter_json, 'w') as fjson:
fjson.write(json.dumps(dict(config.items("parameter"))))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment