diff --git a/install_multistream_rtmp.sh b/install_multistream_rtmp.sh index 0b246d6..0b49713 100644 --- a/install_multistream_rtmp.sh +++ b/install_multistream_rtmp.sh @@ -37,10 +37,10 @@ make || exit 1 # Install Nginx (this will replace the previous installation) sudo make install || exit 1 -# Read streaming keys and allowed IP from environment variables (or use default values) -TWITCH_KEY=${TWITCH_KEY:-} -YOUTUBE_KEY=${YOUTUBE_KEY:-} -ALLOWED_IP=${ALLOWED_IP:-192.168.1.100} +# Prompt for streaming keys and allowed IP +read -p "Enter your Twitch streaming key: " TWITCH_KEY +read -p "Enter your YouTube streaming key: " YOUTUBE_KEY +read -p "Enter the IP address allowed to publish streams: " ALLOWED_IP # Write the RTMP configuration to the nginx.conf file sudo tee -a /etc/nginx/nginx.conf > /dev/null << EOL @@ -68,7 +68,7 @@ rtmp { } # Application for local testing - application live { + application local { live on; record off; } @@ -108,4 +108,7 @@ sudo iptables -A OUTPUT -p tcp --sport 1935 -j ACCEPT sudo iptables -A INPUT -p tcp --match multiport --dports 32768:61000 -j ACCEPT # Save the iptables rules -sudo netfilter-persistent save \ No newline at end of file +sudo netfilter-persistent save + +# Confirm the location of the configuration file +echo "Nginx configuration file is located at: /etc/nginx/nginx.conf"