summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/playbooks/substitute.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kud/deployment_infra/playbooks/substitute.sh')
-rwxr-xr-xkud/deployment_infra/playbooks/substitute.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/kud/deployment_infra/playbooks/substitute.sh b/kud/deployment_infra/playbooks/substitute.sh
new file mode 100755
index 00000000..f6907a42
--- /dev/null
+++ b/kud/deployment_infra/playbooks/substitute.sh
@@ -0,0 +1,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