Actualiser install_multistream_rtmp.sh
This commit is contained in:
@@ -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:-<your_twitch_key_default>}
|
||||
YOUTUBE_KEY=${YOUTUBE_KEY:-<your_youtube_key_default>}
|
||||
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;
|
||||
}
|
||||
@@ -109,3 +109,6 @@ sudo iptables -A INPUT -p tcp --match multiport --dports 32768:61000 -j ACCEPT
|
||||
|
||||
# Save the iptables rules
|
||||
sudo netfilter-persistent save
|
||||
|
||||
# Confirm the location of the configuration file
|
||||
echo "Nginx configuration file is located at: /etc/nginx/nginx.conf"
|
||||
|
||||
Reference in New Issue
Block a user