diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-11-22 08:09:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-22 08:09:20 +0200 |
commit | 756bd6d45ab76cca7155fb76a0d3c8e4dbe6d517 (patch) | |
tree | 9072da20295d86482d94a864f961e57a869cfd56 /src/migration-scripts/https/4-to-5 | |
parent | d908073cac14539ba54665715ab84a5bf40662ad (diff) | |
parent | 92a75196e5a0d9568905f1c990a080cc4e1e0ea9 (diff) | |
download | vyos-1x-756bd6d45ab76cca7155fb76a0d3c8e4dbe6d517.tar.gz vyos-1x-756bd6d45ab76cca7155fb76a0d3c8e4dbe6d517.zip |
Merge pull request #2523 from vyos/mergify/bp/sagitta/pr-2519
http: T5762: rename "virtual-host listen-port" -> "virtual-host port" (backport #2519)
Diffstat (limited to 'src/migration-scripts/https/4-to-5')
-rwxr-xr-x | src/migration-scripts/https/4-to-5 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/migration-scripts/https/4-to-5 b/src/migration-scripts/https/4-to-5 index a503e0cb7..0dfb6ac19 100755 --- a/src/migration-scripts/https/4-to-5 +++ b/src/migration-scripts/https/4-to-5 @@ -48,6 +48,12 @@ if config.exists(base + ['api', 'socket']): if config.exists(base + ['api', 'port']): config.delete(base + ['api', 'port']) +# rename listen-port -> port ver virtual-host +if config.exists(base + ['virtual-host']): + for vhost in config.list_nodes(base + ['virtual-host']): + if config.exists(base + ['virtual-host', vhost, 'listen-port']): + config.rename(base + ['virtual-host', vhost, 'listen-port'], 'port') + try: with open(file_name, 'w') as f: f.write(config.to_string()) |