From bb195e681a0d8c96eff16ebf725578c9ea58567f Mon Sep 17 00:00:00 2001 From: burak-58 Date: Sun, 18 Feb 2024 05:55:57 +0300 Subject: [PATCH] generate secret key in init --- init.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.sh b/init.sh index dadd5958..7aab6a03 100644 --- a/init.sh +++ b/init.sh @@ -5,6 +5,11 @@ INITIALIZED=/usr/local/antmedia/conf/initialized if [ ! -f "$INITIALIZED" ] then + # Generate and set JWT Secret Key + SECRET_KEY=$(openssl rand -base64 32 | head -c 32) + sed -i "/^server.jwtServerControlEnabled=/s|.*|server.jwtServerControlEnabled=true|" /usr/local/antmedia/conf/red5.properties + sed -i "/^server.jwtServerSecretKey=/s|.*|server.jwtServerSecretKey=$SECRET_KEY|" /usr/local/antmedia/conf/red5.properties + ## Local IPV4 export LOCAL_IPv4=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4`