Skip to content

Commit

Permalink
Add comments on restore True
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed May 30, 2024
1 parent 6f5ea6f commit 2fe3e21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion imageroot/actions/clone-module/50configure-module
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ configure_retval = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='conf
"lets_encrypt": os.environ["TRAEFIK_LETS_ENCRYPT"] == 'True',
"host": os.environ["TRAEFIK_HOST"],
"http2https": os.environ["TRAEFIK_HTTP2HTTPS"] == 'True',
"restore": True,
"restore": True, # restore the configuration to the relay rule and the alwaysBccAddress
"retention_days": int(os.environ["RETENTION_DAYS"]),
})
agent.assert_exp(configure_retval['exit_code'] == 0, "The configure-module subtask failed!")
1 change: 1 addition & 0 deletions imageroot/actions/configure-module/90add-relay-rule
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ip_address = rdb.hget(f'node/{node_id}/vpn', 'ip_address')

if providers:
mail_id = providers[0]["module_id"]
# we configure the first time and if we are in a clone or restore action
if not os.environ.get("MAIL_SERVER") or data.get("restore", False):
# first configuration, we add the relay rule
response = agent.tasks.run(f"module/{mail_id}", action='add-relay-rule', data={
Expand Down
2 changes: 1 addition & 1 deletion imageroot/actions/restore-module/50configure-module
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ configure_retval = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='conf
"lets_encrypt": renv["TRAEFIK_LETS_ENCRYPT"] == 'True',
"host": renv["TRAEFIK_HOST"],
"http2https": renv["TRAEFIK_HTTP2HTTPS"] == 'True',
"restore": True,
"restore": True, # restore the configuration to the relay rule and the alwaysBccAddress
'retention_days': int(renv['RETENTION_DAYS']),
})
agent.assert_exp(configure_retval['exit_code'] == 0, "The configure-module subtask failed!")

0 comments on commit 2fe3e21

Please sign in to comment.