Added vpn setup for yams update

This commit is contained in:
Roger Gonzalez 2023-10-21 16:35:51 -03:00
parent 72c31fd328
commit 57826c7c11
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6
4 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@ INSTALL_LOCATION=<install_location>
MEDIA_SERVICE=<media_service> MEDIA_SERVICE=<media_service>
# VPN configuration # VPN configuration
VPN_ENABLED=<vpn_enabled>
VPN_SERVICE=<vpn_service> VPN_SERVICE=<vpn_service>
VPN_USER=<vpn_user> VPN_USER=<vpn_user>
VPN_PASSWORD=<vpn_password> VPN_PASSWORD=<vpn_password>

View File

@ -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_service>;$vpn_service;g" "$env_file"
sed -i -e "s;<vpn_user>;$vpn_user;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_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;#network_mode: \"service:gluetun\";network_mode: \"service:gluetun\";g" "$filename"
sed -i -e "s;ports: # qbittorrent;#port: # qbittorrent;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 # qbittorrent;#- 8080:8080 # qbittorrent;g" "$filename"

View File

@ -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_service>;$vpn_service;g" "$env_file"
sed -i -e "s;<vpn_user>;$vpn_user;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_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;#network_mode: \"service:gluetun\";network_mode: \"service:gluetun\";g" "$filename"
sed -i -e "s;ports: # qbittorrent;#port: # qbittorrent;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 # qbittorrent;#- 8080:8080 # qbittorrent;g" "$filename"

7
yams
View File

@ -100,4 +100,11 @@ if [ "$option" == "update" ]; then
if [ "$MEDIA_SERVICE" == "plex" ]; then 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"
fi 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 fi