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)
|
# Install Nginx (this will replace the previous installation)
|
||||||
sudo make install || exit 1
|
sudo make install || exit 1
|
||||||
|
|
||||||
# Read streaming keys and allowed IP from environment variables (or use default values)
|
# Prompt for streaming keys and allowed IP
|
||||||
TWITCH_KEY=${TWITCH_KEY:-<your_twitch_key_default>}
|
read -p "Enter your Twitch streaming key: " TWITCH_KEY
|
||||||
YOUTUBE_KEY=${YOUTUBE_KEY:-<your_youtube_key_default>}
|
read -p "Enter your YouTube streaming key: " YOUTUBE_KEY
|
||||||
ALLOWED_IP=${ALLOWED_IP:-192.168.1.100}
|
read -p "Enter the IP address allowed to publish streams: " ALLOWED_IP
|
||||||
|
|
||||||
# Write the RTMP configuration to the nginx.conf file
|
# Write the RTMP configuration to the nginx.conf file
|
||||||
sudo tee -a /etc/nginx/nginx.conf > /dev/null << EOL
|
sudo tee -a /etc/nginx/nginx.conf > /dev/null << EOL
|
||||||
@@ -68,7 +68,7 @@ rtmp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Application for local testing
|
# Application for local testing
|
||||||
application live {
|
application local {
|
||||||
live on;
|
live on;
|
||||||
record off;
|
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
|
sudo iptables -A INPUT -p tcp --match multiport --dports 32768:61000 -j ACCEPT
|
||||||
|
|
||||||
# Save the iptables rules
|
# Save the iptables rules
|
||||||
sudo netfilter-persistent save
|
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