Commenting ports out when using plex

This commit is contained in:
Roger Gonzalez 2023-11-12 09:59:02 -03:00
parent f8c7aa7984
commit 9ca91ee039
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6
4 changed files with 11 additions and 5 deletions

View File

@ -14,8 +14,8 @@ services:
- ${MEDIA_DIRECTORY}/movies:/data/movies
- ${MEDIA_DIRECTORY}/tvshows:/data/tvshows
- ${INSTALL_LOCATION}/config/${MEDIA_SERVICE}:/config
ports:
- 8096:8096
ports: # plex
- 8096:8096 # plex
restart: unless-stopped
# qBitorrent is used to download torrents

View File

@ -379,7 +379,9 @@ sed -i -e "s|<your_PUID>|$puid|g" "$env_file" \
-e "s|<media_service>|$media_service|g" "$filename"
if [ "$media_service" == "plex" ]; then
sed -i -e "s|#network_mode: host # plex|network_mode: host # plex|g" "$filename"
sed -i -e "s|#network_mode: host # plex|network_mode: host # plex|g" "$filename" \
-e "s|ports: # plex|#ports: # plex|g" $filename \
-e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" $filename
fi
sed -i -e "s|<install_directory>|$install_directory|g" "$env_file"

View File

@ -222,7 +222,9 @@ sed -i -e "s|<your_PUID>|$puid|g" "$env_file" \
-e "s|<media_service>|$media_service|g" "$filename"
if [ "$media_service" == "plex" ]; then
sed -i -e "s|#network_mode: host # plex|network_mode: host # plex|g" "$filename"
sed -i -e "s|#network_mode: host # plex|network_mode: host # plex|g" "$filename" \
-e "s|ports: # plex|#ports: # plex|g" $filename \
-e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" $filename
fi
sed -i -e "s|<install_directory>|$install_directory|g" "$env_file"

4
yams
View File

@ -103,7 +103,9 @@ if [ "$option" == "update" ]; then
sed -i -e "s;<media_service>;$MEDIA_SERVICE;g" "$filename"
if [ "$MEDIA_SERVICE" == "plex" ]; then
sed -i -e "s;#network_mode: host # plex;network_mode: host # plex;g" "$filename"
sed -i -e "s|#network_mode: host # plex|network_mode: host # plex|g" "$filename" \
-e "s|ports: # plex|#ports: # plex|g" $filename \
-e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" $filename
fi
if [ "$VPN_ENABLED" == "y" ]; then