summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-10-21 16:35:51 -0300
committerRoger Gonzalez <roger@rogs.me>2023-10-21 16:35:51 -0300
commit57826c7c11fb79e65928c97722e88b1a85e8e460 (patch)
treec8cccec2e04b2f7a51ffe6a06cf73598225ec0db
parent72c31fd328c73a679cac7d6fe3cc5eb7b02522ab (diff)
Added vpn setup for yams update
-rw-r--r--.env.example1
-rw-r--r--docs.org1
-rw-r--r--install.sh1
-rwxr-xr-xyams7
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>
diff --git a/docs.org b/docs.org
index 0cfe411..0f95413 100644
--- a/docs.org
+++ b/docs.org
@@ -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"
diff --git a/install.sh b/install.sh
index 223708a..5562881 100644
--- a/install.sh
+++ b/install.sh
@@ -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"
diff --git a/yams b/yams
index d198eba..20ef3c2 100755
--- a/yams
+++ b/yams
@@ -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