From 9ca91ee0390ec6d31eb937812c8376f1c7bf491c Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 09:59:02 -0300 Subject: [PATCH 1/7] Commenting ports out when using plex --- docker-compose.example.yaml | 4 ++-- docs.org | 4 +++- install.sh | 4 +++- yams | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docker-compose.example.yaml b/docker-compose.example.yaml index 9390f32..8b1e2ae 100644 --- a/docker-compose.example.yaml +++ b/docker-compose.example.yaml @@ -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 diff --git a/docs.org b/docs.org index 406c739..e66b9a8 100644 --- a/docs.org +++ b/docs.org @@ -379,7 +379,9 @@ sed -i -e "s||$puid|g" "$env_file" \ -e "s||$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|g" "$env_file" diff --git a/install.sh b/install.sh index 8bf6514..9480f08 100644 --- a/install.sh +++ b/install.sh @@ -222,7 +222,9 @@ sed -i -e "s||$puid|g" "$env_file" \ -e "s||$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|g" "$env_file" diff --git a/yams b/yams index 762313e..44b06ec 100755 --- a/yams +++ b/yams @@ -103,7 +103,9 @@ if [ "$option" == "update" ]; then sed -i -e "s;;$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 -- 2.39.5 From cab2a2aab3bc269c1cb92348a2d304be2b4d7c64 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:11:54 -0300 Subject: [PATCH 2/7] Added quotes around filename --- docs.org | 6 +++--- install.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs.org b/docs.org index e66b9a8..f9ec1e7 100644 --- a/docs.org +++ b/docs.org @@ -380,8 +380,8 @@ sed -i -e "s||$puid|g" "$env_file" \ if [ "$media_service" == "plex" ]; then 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 + -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|g" "$env_file" @@ -392,7 +392,7 @@ if [ "$setup_vpn" == "y" ]; then -e "s||$vpn_password|g" "$env_file" \ -e "s||$setup_vpn|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ - -e "s|ports: # qbittorrent|#port: # qbittorrent|g" "$filename" \ + -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ -e "s|#- 8080:8080/tcp # gluetun|- 8080:8080/tcp # gluetun|g" "$filename" fi diff --git a/install.sh b/install.sh index 9480f08..25fa194 100644 --- a/install.sh +++ b/install.sh @@ -223,8 +223,8 @@ sed -i -e "s||$puid|g" "$env_file" \ if [ "$media_service" == "plex" ]; then 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 + -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|g" "$env_file" @@ -235,7 +235,7 @@ if [ "$setup_vpn" == "y" ]; then -e "s||$vpn_password|g" "$env_file" \ -e "s||$setup_vpn|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ - -e "s|ports: # qbittorrent|#port: # qbittorrent|g" "$filename" \ + -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ -e "s|#- 8080:8080/tcp # gluetun|- 8080:8080/tcp # gluetun|g" "$filename" fi -- 2.39.5 From 1e01d6bceee1e3931be7fbf601b23325e27dc88a Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:14:33 -0300 Subject: [PATCH 3/7] Removed dangling \ --- docs.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.org b/docs.org index f9ec1e7..9259f63 100644 --- a/docs.org +++ b/docs.org @@ -381,7 +381,7 @@ sed -i -e "s||$puid|g" "$env_file" \ if [ "$media_service" == "plex" ]; then 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" \ + -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" fi sed -i -e "s||$install_directory|g" "$env_file" -- 2.39.5 From 303cc389086aafc4577f6e6f52675456765a4f0e Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:14:57 -0300 Subject: [PATCH 4/7] Removed dangling \ --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 25fa194..7851c07 100644 --- a/install.sh +++ b/install.sh @@ -224,7 +224,7 @@ sed -i -e "s||$puid|g" "$env_file" \ if [ "$media_service" == "plex" ]; then 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" \ + -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" fi sed -i -e "s||$install_directory|g" "$env_file" -- 2.39.5 From 6553245b710d97705fe16973fb9db482ed2d5814 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:24:41 -0300 Subject: [PATCH 5/7] Fixed typo from "install_location" to "install_directory" --- .env.example | 2 +- docker-compose.example.yaml | 20 ++++++++++---------- yams | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.env.example b/.env.example index f2e98c3..7571f03 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ PUID= PGID= MEDIA_DIRECTORY= -INSTALL_LOCATION= +INSTALL_DIRECTORY= MEDIA_SERVICE= # VPN configuration diff --git a/docker-compose.example.yaml b/docker-compose.example.yaml index 8b1e2ae..e3365e2 100644 --- a/docker-compose.example.yaml +++ b/docker-compose.example.yaml @@ -13,7 +13,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/movies:/data/movies - ${MEDIA_DIRECTORY}/tvshows:/data/tvshows - - ${INSTALL_LOCATION}/config/${MEDIA_SERVICE}:/config + - ${INSTALL_DIRECTORY}/config/${MEDIA_SERVICE}:/config ports: # plex - 8096:8096 # plex restart: unless-stopped @@ -28,7 +28,7 @@ services: - WEBUI_PORT=8080 volumes: - ${MEDIA_DIRECTORY}/downloads:/downloads - - ${INSTALL_LOCATION}/config/qbittorrent:/config + - ${INSTALL_DIRECTORY}/config/qbittorrent:/config restart: unless-stopped ports: # qbittorrent - 8080:8080 # qbittorrent @@ -45,7 +45,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/tvshows:/tv - ${MEDIA_DIRECTORY}/downloads:/downloads - - ${INSTALL_LOCATION}/config/sonarr:/config + - ${INSTALL_DIRECTORY}/config/sonarr:/config ports: - 8989:8989 restart: unless-stopped @@ -61,7 +61,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/movies:/movies - ${MEDIA_DIRECTORY}/downloads:/downloads - - ${INSTALL_LOCATION}/config/radarr:/config + - ${INSTALL_DIRECTORY}/config/radarr:/config ports: - 7878:7878 restart: unless-stopped @@ -77,7 +77,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/music:/music - ${MEDIA_DIRECTORY}/downloads:/downloads - - ${INSTALL_LOCATION}/config/lidarr:/config + - ${INSTALL_DIRECTORY}/config/lidarr:/config ports: - 8686:8686 restart: unless-stopped @@ -93,7 +93,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/books:/books - ${MEDIA_DIRECTORY}/downloads:/downloads - - ${INSTALL_LOCATION}/config/readarr:/config + - ${INSTALL_DIRECTORY}/config/readarr:/config ports: - 8787:8787 restart: unless-stopped @@ -109,7 +109,7 @@ services: volumes: - ${MEDIA_DIRECTORY}/movies:/movies - ${MEDIA_DIRECTORY}/tvshows:/tv - - ${INSTALL_LOCATION}/config/bazarr:/config + - ${INSTALL_DIRECTORY}/config/bazarr:/config ports: - 6767:6767 restart: unless-stopped @@ -123,7 +123,7 @@ services: - PUID=${PUID} - PGID=${PGID} volumes: - - ${INSTALL_LOCATION}/config/prowlarr:/config + - ${INSTALL_DIRECTORY}/config/prowlarr:/config ports: - 9696:9696 restart: unless-stopped @@ -142,7 +142,7 @@ services: - 8388:8388/udp # Shadowsocks #- 8080:8080/tcp # gluetun volumes: - - ${INSTALL_LOCATION}/config/gluetun:/config + - ${INSTALL_DIRECTORY}/config/gluetun:/config environment: - VPN_SERVICE_PROVIDER=${VPN_SERVICE} - VPN_TYPE=openvpn @@ -160,7 +160,7 @@ services: volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - - ${INSTALL_LOCATION}/config/portainer:/data + - ${INSTALL_DIRECTORY}/config/portainer:/data restart: unless-stopped # Watchtower is going to keep our instances updated diff --git a/yams b/yams index 44b06ec..c18c658 100755 --- a/yams +++ b/yams @@ -3,7 +3,7 @@ set -euo pipefail dc="docker-compose -f -f " -install_location="" +install_directory="" option=${1:-"--help"} @@ -94,9 +94,9 @@ if [ "$option" == "update" ]; then $dc stop rm -rf /tmp/yams && mkdir /tmp/yams wget https://gitlab.com/rogs/yams/-/raw/master/docker-compose.example.yaml -O /tmp/yams/docker-compose.example.yml > /dev/null 2>&1 - source $install_location/.env + source $install_directory/.env - filename="$install_location/docker-compose.yaml" + filename="$install_directory/docker-compose.yaml" cp /tmp/yams/docker-compose.example.yml $filename -- 2.39.5 From 30b6dd846479070b83ba6743281cfdc0e7f8bf88 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:29:49 -0300 Subject: [PATCH 6/7] Moved VPN enabled to outside of the VPN config --- docs.org | 4 ++-- install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs.org b/docs.org index 9259f63..d79521c 100644 --- a/docs.org +++ b/docs.org @@ -384,13 +384,13 @@ if [ "$media_service" == "plex" ]; then -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" fi -sed -i -e "s||$install_directory|g" "$env_file" +sed -i -e "s||$install_directory|g" "$env_file" \ + -e "s||$setup_vpn|g" "$env_file" \ if [ "$setup_vpn" == "y" ]; then sed -i -e "s||$vpn_service|g" "$env_file" \ -e "s||$vpn_user|g" "$env_file" \ -e "s||$vpn_password|g" "$env_file" \ - -e "s||$setup_vpn|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ diff --git a/install.sh b/install.sh index 7851c07..921373b 100644 --- a/install.sh +++ b/install.sh @@ -227,13 +227,13 @@ if [ "$media_service" == "plex" ]; then -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" fi -sed -i -e "s||$install_directory|g" "$env_file" +sed -i -e "s||$install_directory|g" "$env_file" \ + -e "s||$setup_vpn|g" "$env_file" \ if [ "$setup_vpn" == "y" ]; then sed -i -e "s||$vpn_service|g" "$env_file" \ -e "s||$vpn_user|g" "$env_file" \ -e "s||$vpn_password|g" "$env_file" \ - -e "s||$setup_vpn|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ -- 2.39.5 From 40e21a21bf8748385ef3a6d21d16d426dcbe7117 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 12 Nov 2023 10:39:21 -0300 Subject: [PATCH 7/7] Changed identifiers for VPN search --- .env.example | 8 ++++---- docs.org | 8 ++++---- install.sh | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.env.example b/.env.example index 7571f03..34f9659 100644 --- a/.env.example +++ b/.env.example @@ -6,7 +6,7 @@ INSTALL_DIRECTORY= MEDIA_SERVICE= # VPN configuration -VPN_ENABLED= -VPN_SERVICE= -VPN_USER= -VPN_PASSWORD= +VPN_ENABLED=vpn_enabled +VPN_SERVICE=vpn_service +VPN_USER=vpn_user +VPN_PASSWORD=vpn_password diff --git a/docs.org b/docs.org index d79521c..2c6b3b6 100644 --- a/docs.org +++ b/docs.org @@ -385,12 +385,12 @@ if [ "$media_service" == "plex" ]; then fi sed -i -e "s||$install_directory|g" "$env_file" \ - -e "s||$setup_vpn|g" "$env_file" \ + -e "s|vpn_enabled|$setup_vpn|g" "$env_file" \ if [ "$setup_vpn" == "y" ]; then - sed -i -e "s||$vpn_service|g" "$env_file" \ - -e "s||$vpn_user|g" "$env_file" \ - -e "s||$vpn_password|g" "$env_file" \ + sed -i -e "s|vpn_service|$vpn_service|g" "$env_file" \ + -e "s|vpn_user|$vpn_user|g" "$env_file" \ + -e "s|vpn_password|$vpn_password|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ diff --git a/install.sh b/install.sh index 921373b..aa872ae 100644 --- a/install.sh +++ b/install.sh @@ -228,12 +228,12 @@ if [ "$media_service" == "plex" ]; then fi sed -i -e "s||$install_directory|g" "$env_file" \ - -e "s||$setup_vpn|g" "$env_file" \ + -e "s|vpn_enabled|$setup_vpn|g" "$env_file" \ if [ "$setup_vpn" == "y" ]; then - sed -i -e "s||$vpn_service|g" "$env_file" \ - -e "s||$vpn_user|g" "$env_file" \ - -e "s||$vpn_password|g" "$env_file" \ + sed -i -e "s|vpn_service|$vpn_service|g" "$env_file" \ + -e "s|vpn_user|$vpn_user|g" "$env_file" \ + -e "s|vpn_password|$vpn_password|g" "$env_file" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|ports: # qbittorrent|#ports: # qbittorrent|g" "$filename" \ -e "s|- 8080:8080 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \ -- 2.39.5