diff options
author | Roger Gonzalez <roger@rogs.me> | 2023-10-21 16:35:51 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2023-10-21 16:35:51 -0300 |
commit | 57826c7c11fb79e65928c97722e88b1a85e8e460 (patch) | |
tree | c8cccec2e04b2f7a51ffe6a06cf73598225ec0db | |
parent | 72c31fd328c73a679cac7d6fe3cc5eb7b02522ab (diff) |
Added vpn setup for yams update
-rw-r--r-- | .env.example | 1 | ||||
-rw-r--r-- | docs.org | 1 | ||||
-rw-r--r-- | install.sh | 1 | ||||
-rwxr-xr-x | yams | 7 |
4 files changed, 10 insertions, 0 deletions
diff --git a/.env.example b/.env.example index 217fb1e..705d7c1 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ INSTALL_LOCATION=<install_location> MEDIA_SERVICE=<media_service> # VPN configuration +VPN_ENABLED=<vpn_enabled> VPN_SERVICE=<vpn_service> VPN_USER=<vpn_user> VPN_PASSWORD=<vpn_password> @@ -345,6 +345,7 @@ if [ "$setup_vpn" == "y" ]; then sed -i -e "s;<vpn_service>;$vpn_service;g" "$env_file" sed -i -e "s;<vpn_user>;$vpn_user;g" "$env_file" sed -i -e "s;<vpn_password>;$vpn_password;g" "$env_file" + sed -i -e "s;<vpn_enabled>;$setup_vpn;g" "$env_file" sed -i -e "s;#network_mode: \"service:gluetun\";network_mode: \"service:gluetun\";g" "$filename" sed -i -e "s;ports: # qbittorrent;#port: # qbittorrent;g" "$filename" sed -i -e "s;- 8080:8080 # qbittorrent;#- 8080:8080 # qbittorrent;g" "$filename" @@ -203,6 +203,7 @@ if [ "$setup_vpn" == "y" ]; then sed -i -e "s;<vpn_service>;$vpn_service;g" "$env_file" sed -i -e "s;<vpn_user>;$vpn_user;g" "$env_file" sed -i -e "s;<vpn_password>;$vpn_password;g" "$env_file" + sed -i -e "s;<vpn_enabled>;$setup_vpn;g" "$env_file" sed -i -e "s;#network_mode: \"service:gluetun\";network_mode: \"service:gluetun\";g" "$filename" sed -i -e "s;ports: # qbittorrent;#port: # qbittorrent;g" "$filename" sed -i -e "s;- 8080:8080 # qbittorrent;#- 8080:8080 # qbittorrent;g" "$filename" @@ -100,4 +100,11 @@ if [ "$option" == "update" ]; then if [ "$MEDIA_SERVICE" == "plex" ]; then sed -i -e "s;#network_mode: host # plex;network_mode: host # plex;g" "$filename" fi + + if [ "$VPN_ENABLED" == "y" ]; then + sed -i -e "s;#network_mode: \"service:gluetun\";network_mode: \"service:gluetun\";g" "$filename" + sed -i -e "s;ports: # qbittorrent;#port: # qbittorrent;g" "$filename" + sed -i -e "s;- 8080:8080 # qbittorrent;#- 8080:8080 # qbittorrent;g" "$filename" + sed -i -e "s;#- 8080:8080/tcp # gluetun;- 8080:8080/tcp # gluetun;g" "$filename" + fi fi |