vaguely autodetect the livekit public IP

This commit is contained in:
Matthew Hodgson
2024-11-08 19:56:09 +00:00
parent e71c270968
commit 6421de30c8

View File

@@ -21,6 +21,11 @@ if [[ ! -e .env ]]; then
sed -ir s/^USER_ID=/USER_ID=$(id -u)/ .env
sed -ir s/^GROUP_ID=/GROUP_ID=$(id -g)/ .env
NODE_IP=`getent hosts livekit.$DOMAIN | cut -d' ' -f1`
if ! [ -z "$NODE_IP" ]; then
sed -ir s/LIVEKIT_NODE_IP=127.0.0.1/LIVEKIT_NODE_IP=$NODE_IP/ .env
fi
read -p "Enter base domain name (e.g. example.com): " DOMAIN
sed -ir s/example.com/$DOMAIN/ .env