fix-hosts.sh.erb 308 Bytes
Newer Older
o's avatar
o committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

export XDG_RUNTIME_DIR=/run/pods/$(id -u)

while [ -z "$(podman ps | grep meet-jvb)" ]; do
  echo "waiting for jvb"
  sleep 1
done

ID="$(podman ps | grep meet-jvb | cut -d' ' -f1)"

FILE=$(mktemp)
echo "<%= @ipaddress %>   ${ID}" > $FILE
14
chmod 444 $FILE
o's avatar
o committed
15
16
podman cp $FILE $ID:/etc/hosts
rm $FILE