Skip to content

Commit

Permalink
Restore SFTP_TCP_PORT env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Aug 12, 2024
1 parent f62a68e commit 695c1f8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions imageroot/actions/restore-module/06copyenv
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ original_environment = request['environment']
for evar in [
"TRAEFIK_PATH",
"TRAEFIK_HTTP2HTTPS",
"SFTP_TCP_PORT",
]:
agent.set_env(evar, original_environment[evar])

# sftp uses the first one, sftpgo uses the second random port, nginx the third one
env_tcp_ports = os.environ["TCP_PORTS"].split(',')
sftp_tcp_port = env_tcp_ports[0]
sftpgo_tcp_port = env_tcp_ports[1]
nginx_tcp_port = env_tcp_ports[2]
# Talk with agent using file descriptor.
# Setup configuration from user input.
agent.set_env("SFTP_TCP_PORT", sftp_tcp_port)
agent.set_env("SFTPGO_TCP_PORT", sftpgo_tcp_port)
agent.set_env("NGINX_TCP_PORT", nginx_tcp_port)

agent.dump_env()

0 comments on commit 695c1f8

Please sign in to comment.