This commit is contained in:
Björn Ellensohn 2023-11-14 15:29:24 +01:00
parent fa9c96aa3e
commit a34849f92a
3 changed files with 11 additions and 11 deletions

View File

@ -79,20 +79,20 @@ fi
apt update && apt install -y iproute2 apt update && apt install -y iproute2
# Find the ZeroTier interface name dynamically # Find the ZeroTier interface name dynamically
zerotier_interface=$(ip addr show | awk '/^.*: zt/{print $2}' | cut -d ':' -f 1) # zerotier_interface=$(ip addr show | awk '/^.*: zt/{print $2}' | cut -d ':' -f 1)
if [ -z "$zerotier_interface" ]; then # if [ -z "$zerotier_interface" ]; then
echo "ZeroTier interface not found." # echo "ZeroTier interface not found."
exit 1 # exit 1
fi # fi
echo "Using ZeroTier interface: $zerotier_interface" # echo "Using ZeroTier interface: $zerotier_interface"
# Set the path to your CycloneDDS configuration file # # Set the path to your CycloneDDS configuration file
config_file="/cyclonedds.xml" # config_file="/cyclonedds.xml"
# Replace the content between <NetworkInterfaceAddress> tags # # Replace the content between <NetworkInterfaceAddress> tags
sed -i "s|<NetworkInterfaceAddress>.*</NetworkInterfaceAddress>|<NetworkInterfaceAddress>$zerotier_interface</NetworkInterfaceAddress>|g" "$config_file" # sed -i "s|<NetworkInterfaceAddress>.*</NetworkInterfaceAddress>|<NetworkInterfaceAddress>$zerotier_interface</NetworkInterfaceAddress>|g" "$config_file"
# Execute the command passed into this entrypoint # Execute the command passed into this entrypoint
exec "$@" exec "$@"

View File

@ -60,7 +60,7 @@ services:
- /tmp/.X11-unix:/tmp/.X11-unix:rw - /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
- ./customize/entrypoint.sh:/entrypoint.sh - ./customize/entrypoint.sh:/entrypoint.sh
- ./customize/cyclonedds_zerotier.xml:/cyclonedds.xml - ./customize/cyclonedds.xml:/cyclonedds.xml
# networks: # not using bridging anymore, instead try using all services on macvlan? let's see... shoudl word for now. Bridging does definitely not work because multicast is not supported here. # networks: # not using bridging anymore, instead try using all services on macvlan? let's see... shoudl word for now. Bridging does definitely not work because multicast is not supported here.
# rmp: # rmp: