export HOST_FS_ROOT="$(dirname "$(realpath "$0")")"
cd "$HOST_FS_ROOT" && find . -type d -exec mkdir -p -- /tmp/host/{} \;
HOST_RESTART_QUERY_FILE="/opt/host_restart_request"
isRestart=1
while [[ $isRestart == 1 ]]; do
./bin/host --fs-root=$HOST_FS_ROOT
if [[ -f "$HOST_RESTART_QUERY_FILE" ]]; then
isRestart=1;
rm "$HOST_RESTART_QUERY_FILE";
else
isRestart=1;
fi
sleep 3
{ ./run_socat.sh > /dev/null & } && echo ">>>>>>>>>>>>Socat is running<<<<<<<<<<<<"
done