Skip to content
Snippets Groups Projects
Commit 7a58a13b authored by Rute C. Sofia's avatar Rute C. Sofia :football:
Browse files

Script to adapt the TSMatch docker .env files to the IP being used in the local device.

parent 3f8e0764
No related branches found
No related tags found
No related merge requests found
Pipeline #36390 failed
#!/bin/sh
# Copyright (c) fortiss GmbH 2022
# @author Mert Sarac
#ask for new ip
echo "enter the old ip adress which need to change"
read OLD_IP
NEW_IP=''$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)'';
echo $NEW_IP
# for thing_discovery container
echo -e "\n$(date -u): Change for thing_discovery container..."
cd thing_discovery && sed -i "s/$OLD_IP/$NEW_IP/g" .env && cd ..
# for semantic_matchmaking container
echo -e "\n$(date -u): Change semantic_matchmaking container..."
cd tsmatch_engine/semantic_matchmaking && sed -i "s/$OLD_IP/$NEW_IP/g" .env && cd ../..
# for data_aggregation container
echo -e "\n$(date -u): Change data_aggregation container..."
cd tsmatch_engine/data_aggregation && sed -i "s/$OLD_IP/$NEW_IP/g" .env && cd ../..
# for ontology_interface container
echo -e "\n$(date -u): Change ontology_interface container..."
cd esi/ontology_interface && sed -i "s/$OLD_IP/$NEW_IP/g" .env && cd ../..
# for thing container
echo -e "\n$(date -u): Change service_registry container..."
cd thing/raspberry_pi/ && sed -i "s/$OLD_IP/$NEW_IP/g" .env && cd ../..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment