add python compatibility module
[multicloud/k8s.git] / kud / deployment_infra / playbooks / substitute.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 for file in $(find /etc/*.conf -type f -name "c6xxvf_dev*.conf"); do
12     device_id=$( echo $file | cut -d '_' -f 2 | tr -cd '[[:digit:]]')
13     echo $device_id
14     cat /etc/c6xxvf_dev${device_id}.conf
15     sed -i "s/\[SSL\]/\[SSL${device_id}\]/g" /etc/c6xxvf_dev${device_id}.conf
16 done
17
18 for file in $(find /etc/*.conf -type f -name "c6xx_dev*.conf"); do
19     dev_id=$( echo $file | cut -d '_' -f 2 | tr -cd '[[:digit:]]')
20     echo $dev_id
21     cat /etc/c6xx_dev${dev_id}.conf
22     sed -i "s/\[SSL\]/\[SSL${dev_id}\]/g" /etc/c6xx_dev${dev_id}.conf
23 done