Moved VPN enabled to outside of the VPN config

This commit is contained in:
Roger Gonzalez 2023-11-12 10:29:49 -03:00
parent 6553245b71
commit 30b6dd8464
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6
2 changed files with 4 additions and 4 deletions

View File

@ -384,13 +384,13 @@ if [ "$media_service" == "plex" ]; then
-e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename"
fi fi
sed -i -e "s|<install_directory>|$install_directory|g" "$env_file" sed -i -e "s|<install_directory>|$install_directory|g" "$env_file" \
-e "s|<vpn_enabled>|$setup_vpn|g" "$env_file" \
if [ "$setup_vpn" == "y" ]; then if [ "$setup_vpn" == "y" ]; then
sed -i -e "s|<vpn_service>|$vpn_service|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_user>|$vpn_user|g" "$env_file" \
-e "s|<vpn_password>|$vpn_password|g" "$env_file" \ -e "s|<vpn_password>|$vpn_password|g" "$env_file" \
-e "s|<vpn_enabled>|$setup_vpn|g" "$env_file" \
-e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \
-e "s|ports: # qbittorrent|#ports: # 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 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \

View File

@ -227,13 +227,13 @@ if [ "$media_service" == "plex" ]; then
-e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename" -e "s|- 8096:8096 # plex|#- 8096:8096 # plex|g" "$filename"
fi fi
sed -i -e "s|<install_directory>|$install_directory|g" "$env_file" sed -i -e "s|<install_directory>|$install_directory|g" "$env_file" \
-e "s|<vpn_enabled>|$setup_vpn|g" "$env_file" \
if [ "$setup_vpn" == "y" ]; then if [ "$setup_vpn" == "y" ]; then
sed -i -e "s|<vpn_service>|$vpn_service|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_user>|$vpn_user|g" "$env_file" \
-e "s|<vpn_password>|$vpn_password|g" "$env_file" \ -e "s|<vpn_password>|$vpn_password|g" "$env_file" \
-e "s|<vpn_enabled>|$setup_vpn|g" "$env_file" \
-e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \ -e "s|#network_mode: \"service:gluetun\"|network_mode: \"service:gluetun\"|g" "$filename" \
-e "s|ports: # qbittorrent|#ports: # 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 # qbittorrent|#- 8080:8080 # qbittorrent|g" "$filename" \