aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/playbooks/substitute.sh
blob: f6907a4282c8a2f634ff77057ae12f55626f060f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

for file in $(find /etc/*.conf -type f -name "c6xxvf_dev*.conf"); do
    device_id=$( echo $file | cut -d '_' -f 2 | tr -cd '[[:digit:]]')
    echo $device_id
    cat /etc/c6xxvf_dev${device_id}.conf
    sed -i "s/\[SSL\]/\[SSL${device_id}\]/g" /etc/c6xxvf_dev${device_id}.conf
done

for file in $(find /etc/*.conf -type f -name "c6xx_dev*.conf"); do
    dev_id=$( echo $file | cut -d '_' -f 2 | tr -cd '[[:digit:]]')
    echo $dev_id
    cat /etc/c6xx_dev${dev_id}.conf
    sed -i "s/\[SSL\]/\[SSL${dev_id}\]/g" /etc/c6xx_dev${dev_id}.conf
done