diff options
author | John Estabrook <jestabro@vyos.io> | 2023-11-21 23:29:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 23:29:38 -0600 |
commit | af08c30063fb1c68cbf1ca6cae3588efdef34b7d (patch) | |
tree | f567319c5761857d145af9685ee4343402172d61 /src/migration-scripts | |
parent | 02a3e26e88f0ac3c7368e288769bfed38b41df46 (diff) | |
parent | 0e885f1bf01424130b6876e769cc42612b19351b (diff) | |
download | vyos-1x-af08c30063fb1c68cbf1ca6cae3588efdef34b7d.tar.gz vyos-1x-af08c30063fb1c68cbf1ca6cae3588efdef34b7d.zip |
Merge pull request #2519 from c-po/t5762-vhost-port
http: T5762: rename "virtual-host listen-port" -> "virtual-host port"
Diffstat (limited to 'src/migration-scripts')
-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()) |