#!/bin/bash

apt-get install iproute2 original-awk iputils-ping -y

HOST_DOMAIN="host.docker.internal"
ping -q -c1 $HOST_DOMAIN > /dev/null 2>&1
if [ $? -ne 0 ]; then
  HOST_IP=$(ip route | awk 'NR==1 {print $3}')
  echo -e "$HOST_IP\t$HOST_DOMAIN" >> /etc/hosts
fi


cd /XSeeker
stdbuf -i0 -o0 -e0 ./run.sh 2>&1 > /var/log/xseeker.log